HTML 4 base Tag

Also see HTML5 <base> Tag.

This page is for the HTML 4 version of this element. For a more up to date version, see HTML5 <base> Tag.


The HTML base tag is used to specify a base URI, or URL, for relative links. For example, you can set the base URL once at the top of your page, then all subsequent relative links will use that URL as a starting point.

Example

The link above will actually resolve to https://www.quackit.com/javascript/javascript_arrays.cfm regardless of the URL of the current page. This is because the base URL (https://www.quackit.com/javascript/) is prepended to the (relative) URL indicated in the link (javascript_arrays.cfm)

Attributes

Attributes specific to this tag:
AttributeDescription
hrefSpecifies the URI/URL to use.
Other Attributes:
AttributeDescription
targetTarget frame/window

HTML5 Tags

The information on this page is based on HTML version 4.01. Most modern browsers now support HTML5.

See HTML5 <base> Tag for the HTML5 version of the above element.

See this list of HTML tags for the latest list of HTML elements.