ToC ~ Up ~ Prev ~ Next ~ Index Introduction to HTML
Last Update: 5 January 1998

3.1 BASE

This element is used to record the URL of the document itself. This is useful if the document is moved away from its original location and the related documents, in which case partial URLs (things like HREF="image.gif"), which are calculated relative to the new URL of the document, become invalid. If BASE is specified, partial URLs within the document are treated as relative to the BASE address.

WARNING -- BASE can cause problems with ISINDEX queries, since some browsers will use the BASE URL to determine where to send the ISINDEX query data, and some will use the actual URL used to obtain the document.

If the BASE element is absent the document viewer assumes the base URL to be one used to access the document.

3.1.1 Example of Use

<HEAD>
  <BASE HREF="http://www.blob.dirt.edu/stuff/junk/file.html">
  ... 
</HEAD>

3.1.2 Important BASE Extensions

Browsers that support FRAMEs also support a TARGET attribute to the BASE elements. This defines the named frame (or window) to which all anchors in the current document are directed. This can be overriden by TARGET attributes specific to an A elements.


ToC ~ Up ~ Prev ~ Next ~ Index Introduction to HTML
© 1994-1998 by Ian Graham
Last Update: 5 January 1998