CSS
Clarifying the style attribute
16:29, 26 Oct 2000 UTC | Simon St.Laurent

The W3C has posted a Working Draft of Syntax of CSS rules in HTML's "style" attribute, addressing an issue that affects XHTML, SVG, MathML, and potentially other XML vocabularies as well.

In this brief draft, the style attribute is bound more tightly to Cascading Style Sheets, and a more formal grammar provided for the property-and-value content of these attributes. Perhaps most importantly, it also states:

"This document recommends that any future XML based languages which have presentational information (whether visual, aural, tactile or other) also add a STYLE attribute which similarly permits the user to use CSS to style the document and elements in documents written in that language."

No further information is provided regarding appropriate namespaces for that attribute - SVG, MathML, and XHTML all currently use their own namespaces for the style attribute, sharing only a lower-case local name of 'style'.

The draft also notes that CSS isn't the only possibility for style attribute content, though it says that the style attribute "by default, and in practice, has only contained CSS."

The draft's authors also leave untouched an aspect of style attribute usage that has raised criticism in the past: the use of non-XML syntax to indicate multiple property values within what looks to XML like an atomic attribute value.

  
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories
CSS
XHTML