id [ type ID ]class [ type NMTOKENS ]title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]style [ type CDATA ], from the Style Attribute Module (deprecated)id attribute may be used on most elements in the Element Index - all except: base, head, html, meta, title. It is #REQUIRED on the map element.id attribute is seemingly permitted by the
*XHTML 1.1
Structure Module DTD on the
html and head elements,
its presence on these elements currently
causes a page to fail W3C Validation and so they are not considered valid in this reference.class attribute may be used on most elements in the Element Index - all except: base, head, html, meta, param, script, style, title.title attribute may be used on most elements in the Element Index - all except: base, head, html, meta, param, script, title.xmlns attribute may be used on any element in the Element Index. Despite being #FIXED rather than #REQUIRED in the DTD,
the xmlns attribute is compulsory on the
html element in order for a document to pass
W3C Validation.style attribute may be used on most elements in the Element Index - all except: base, head, html, meta, param, script, style, title.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.
xml:space AttributeThe 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.