Thoughts on CLASS and ROLE attributes in HTML 3 draft

Joe English (joe@trystero.art.com)
Fri, 10 Mar 1995 11:08:57 PST

In the current HTML 3 draft, every element has a CLASS
attribute for user-defined semantics and stylesheet hooks.
A few elements (<NOTE role=footnote>, <HTML role=(toc|doc|...)>
also have a ROLE attribute with predefined semantics. A few others
(<DIV class=banner>, <TR class=(header|footer)>) have predefined
semantics for the *CLASS* attribute.

I think it would be a good idea to orthogonalize these attributes;
that is, leave CLASS attribute values entirely in the user's
namespace, and use ROLE for everything with predefined semantics.

That way authors could use any value for CLASS without worrying
that it will later get defined to mean something unexpected.
Browsers and future revisions of the DTD would use ROLE for
experimental features or standardized semantics. CLASS attribute
values would always be treated as opaque tokens.

How does that sound?

--Joe English

joe@trystero.art.com