NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

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 />
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

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

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.


<base href="" />
<base target="_blank" href="" />


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


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 >