[uf-discuss] URLs in hrefs

Michael Smethurst Michael.Smethurst at bbc.co.uk
Wed Apr 25 08:51:01 PDT 2007


Simple and elegant

For some reason I'd always thought base was something set in the http header
rather than the markup

The longer I spend with html the less I think I know

Anyway thanks for your help


On 23/4/07 13:22, "Brian Suda" <brian.suda at gmail.com> wrote:

> On 4/23/07, Michael Smethurst <Michael.Smethurst at bbc.co.uk> wrote:
>> But the question remains:
>> Microformats aside, if I'm making a new website from scratch (no legacy
>> code/markup) and I want to encourage others to hack, mashup, interwingle it
>> with other data is it best to use /radio4 or http://www.bbc.co.uk/radio4
>> ?
> 
> you can have the best of both worlds. In each <a href=""> just use
> "/radio4". This makes the link relative. But then you can also add a
> <base href="http://bbc.co.uk/"> when this is in your HTML it will make
> all the hrefs absolute (or it should for any decent parser).
> 
> The advantage of using the <base> element is that you can easily
> switch it to something like <base href="http://my-dev-site.bcc.co.uk">
> and you don't have to rewrite all the hrefs within the HTML.
> 
> -brian


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					


More information about the microformats-discuss mailing list