Core Attribute Collection


 
Reference: *W3C - XHTML Modularisation 1.1 - Attribute Collections

Attributes in this Collection

id [ type ID ]
A unique identifier for the element
class [ type NMTOKENS ]
One or more space separated classes
title [ type Text ]
Descriptive title for the element (in some user agents this may appear as a "tooltip" when the mouse hovers over the element)
xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace
style [ type CDATA ], from the Style Attribute Module (deprecated)
Element-specific styles

Where to Use Attributes in this Collection


Description

The Core Attribute Collection contains attributes used by the majority of XHTML 1.1 elements. Usually these attributes are optional, with the exceptions that the id attribute is #REQUIRED on the map element and that the #FIXED xmlns attribute is compulsory on the html element for an XHTML 1.1 document to successfully pass W3C Validation.

The style attribute is declared by the deprecated Style Attribute Module and so should be avoided in new code. Sometimes this attribute is put in its own separate Collection (for example in the W3C *W3C - XHTML Modularisation 1.1 - Attribute Collections page) but within the DTD itself it is added to the Core Attribute Collection, via the entity Core.extra.attrib - see *Style Attribute Module DTD for more information.

The Style Attribute Module is selected in the default DTD used on this site and so this module has been documented, despite being deprecated.

A Word on the xml:space Attribute

The xml:space attribute (see: *XML 1.0 White Space Handling) is included as part of the *Core Attribute Collection at the W3C (Prose Specification) and is given an *XML 1.0 default declaration of #FIXED 'preserve' in the *XHTML Common Attributes DTD. In the DTD, it is also similarly declared on the script and style elements.

Due to current inconsistencies between the Prose Specification, the DTD and the behaviour of the *W3C Validator I am not going to mention the xml:space attribute any further on this site (except for a mention in XHTML 1.1 Inconsistencies). Since the DTD allows only a value of "preserve" (although the prose says otherwise!), there seems little point in adding it to an element in any case.


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 16 May 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 > Common Attributes (XHTML 1.1) > Core Attribute Collection