HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<base> (Base URL)


This element specifies the base URL to use for all relative URLs contained within a document.

Standard Syntax


<base />
href="url"
id="unique alphanumeric identifier"
target="_blank | frame-name
| _parent | _self |
top" (transitional only) />

Events Defined by Internet Explorer


onlayoutcomplete, onmouseenter, onmouseleave, onreadystatechange

Element Specific Attributes


href
This attribute specifies the base URL to be used throughout the document for relative URL addresses.

target
For documents containing frames, this attribute specifies the default target window for every link that does not have an explicit target reference. Aside from named frames, several special values exist. A value of _blank indicates a new window. A value of _parent indicates the parent frame set containing the source link. A value of _self indicates the frame containing the source link. A value of _top indicates the full browser window.

Examples


<base href="http://www.democompany.com/" />
<base target="_blank" href="http://www.democompany.com/" />

Compatibility


HTML 2, 3.2, 4, 4.01, and XHTML 1.0, 1.1, Basic
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4- 4.7, 6, 7
Opera 4-7

Notes


This element should only occur within the head element.

HTML 2.0 and 3.2 define only the href attribute.

XHTML 1.0 requires a trailing slash: <base />.

(X)HTML Elements
CSS Properties
Previous: b Next: basefont
< Home | About | Chapters | Examples | Errata | Reference | Site Map >