The base HTML element provides a base for relative URIs in the HTML. Must JavaScript and CSS also honor it for relative URIs issued in them:
E.g.
JavaScrip
The base
tag is indeed only honoured by the relative links inside the HTML document itself.
There's however an IE6-specific bug which you really need to take into account when using
tag in HTML (not in XHTML). The
tag is in HTML documented as not having an end tag , but IE6 incorrectly assumed it for true which will cause that the entire content after the
tag is placed as child of the
tag in its HTML DOM tree. This can cause at first sight unexplainable problems in Javascript/jQuery/CSS, i.e. the elements being completely unreachable in specific selections (e.g. html>body
) until you discover that there's actually a base
in between.
A normal IE6 fix is using conditional comments to include the end tag: