You are here: Reference > HTML > tags > base

base element

Browser support:
Specifies an explicit URL to use for all relative URLs within the document.
The base element allows defining a base URI for the document. It is useful if you want to insert many images, objects, styleSheets, scripts, etc. relative to a path other than the current document location. Must be placed in the head section.
If you want to see the HTML tags by categories, please visit this page.
This element cannot have a closing tag.
JavaScript page for this element: base.

Possible members:

Sets the base URL to be used throughout the document for relative URL addresses.
Sets a unique identifier for the object.
Sets the name of an element.
Specifies the target window or frame where the document is to be opened.

Example HTML code 1:

This example illustrates the use of the base element:
    <base href="" />
    This link is relative to the <a href="common/images/area.gif">base URL</a>.
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content