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:

Attributes
Events
Styles
href
Sets the base URL to be used throughout the document for relative URL addresses.
id
Sets a unique identifier for the object.
name
Sets the name of an element.
target
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:
<head>
    <base href="http://help.dottoro.com/external/examples/" />
</head>
<body>
    This link is relative to the <a href="common/images/area.gif">base URL</a>.
</body>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content