Note: This is not necessarily the same as the URI used to request the document, as the base URI may be overridden by an HTTP header that redirects the browser to another address.
This is an example base element and the resulting address for an image:
<BASE href="http://www.acme.com/intro.html">
...
<IMG src="icons/logo.gif">
The absolute address for the image is:
"http://www.acme.com/icons/logo.gif"
This element must be specified inside the HEAD section of the document, before any resource that is referenced with a relative address.
<!ELEMENT BASE - O EMPTY -- document base URI --> <!ATTLIST BASE href %URI; #REQUIRED -- URI that acts as base URI -- >from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."
Magic TARGET names
These names all begin with the underscore character. Any targeted window name
beginning with underscore which is not one of these names, will be ignored.
Value | Description |
---|---|
_blank | This target will cause the link to always be loaded in a new blank window. This window is not named. |
_self | This target causes the link to always load in the same window the anchor was clicked in. This is useful for overriding a globally assigned BASE target. |
_parent |
This target makes the link load in the immediate FRAMESET parent of this
document. This defaults to acting like _self if the document
has no parent.
|
_top |
This target makes the link load in the full body of the window. This
defaults to acting like _self if the document is already at the
top. It is useful for breaking out of an arbitrarily deep FRAME nesting.
|
To see the BASE element in action
|
To see the BASE element in action view this example. |