The Base element allows the URL of the document itself to be set, to help browsers in situations where the document may be read out of context. It is especially useful in allowing browsers to determine any partial URL's, or relative paths that may be specified (for example, in <A HREF>
elements, or paths pointing to <IMG SRC=>
(images). The <BASE>
Element should appear within the bounds of the <HEAD>
element.
Where the base address is not specified, the HTML user agent uses the URL it used to access the document to resolve any relative URLs.
The Base element has one attribute, HREF, which identifies the URL, which should be a fully qualified URL
<BASE HREF="http://www.myhost.com/">
specifies www.myhost.com to be the base from which all relative URLs should be determined.
The Netscape Navigator (from version 2.0) and Internet Explorer (from version 3.0) adds one other attribute to the BASE
element. With the introduction of targeted windows the TARGET attribute as used in anchors (<A>
) can be used.
This allows the author to pick a default named target window for every link in a document that does not have an explicit TARGET
attribute. It's format is:
<BASE TARGET="default_target">