CLASS attribute (Was: No IMG in FIG)

Joe English ([email protected])
Fri, 04 Aug 1995 09:32:10 -0700


[email protected] (Michael Johnson) wrote:

> Some have proposed using the CLASS attribute of EM to replace those tags. My
> opinion is that this is an abuse of the CLASS attribute. I infer from the
> IETF draft and comments in the DTD that CLASS exists purely to allow elements
> to be subclassed for the purposes of presentation. I do not think that Dave
> intended CLASS to be used to dynamically define new semantic markup, nor do I
> think it would be a good idea to use it for this.

Actually, that's precisely what CLASS was designed for.

At one point the HTML+ draft included a parameter entity hook
that allowed authors to define new elements by overriding that entity
in the DTD internal subset. "htmlplus.dtd" contained something like

<!ENTITY % text "#PCDATA | em | strong | ... | %extra;">
<!ELEMENT (%extra;) - - (%text;)*>

and authors could use:

<!DOCTYPE HTMLPLUS SYSTEM "htmlplus.dtd" [
<!ENTITY % extra "author|acronym">
]>

to define new <AUTHOR> and <ACRONYM> elements.
There was also a <RENDER> element to describe how
new elements should be presented.

This extension scheme was replaced by the CLASS attribute
(which is more general-purpose and does not require
browsers to parse the DTD on the fly), and <RENDER>
was removed entirely.

Of course, that was back when the lack of rich semantic
elements was seen as a greater problem in HTML than
the lack of presentation control...

--Joe English

[email protected]