base Element


 

Module

The base element is declared by the XHTML 1.1 Base Module

This is the only element in this Module.

Description

The base element is used (within the document head) to specify an absolute base URI against which all relative URIs in the document should be resolved. The #REQUIRED href attribute is used for this purpose. No document may contain more than one base element.

If a base element is not present within a document, the base URI is taken to be URI of the document itself.

For example, to ensure that all relative URIs within a document are resolved with respect to http://www.webcompliant.co.uk/, use the following:

<base href="http://www.webcompliant.co.uk/" />

Note that, for an object element, the base URI may be changed using the codebase attribute.

#REQUIRED Attributes

The href attribute is #REQUIRED on the base element.


Specific Attributes

Specific attributes of the base element are listed below:

From the Base Module - the Element's own Module

href [ type URI - #REQUIRED ]
Absolute URI to be used as a base for resolving relative URIs in the document

From the Target Module

target [ type FrameTarget ]
Indicates the window or frame in which to open hyperlinks

Common Attributes

Common attributes of the base element are listed below:

From the Core Attribute Collection

xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

Content Model

The Content Model for the base element is:

EMPTY

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of base

This element is empty and may have no children.

Valid parents of base


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > base Element