Enhancements for HTML 2.1

Joe English (joe@trystero.art.com)
Sat, 18 Mar 1995 09:05:47 PST

There are three features in the draft HTML 3 DTD
that I'd like to see added to HTML 2.1 (or hopefully
even HTML 2.0, if it's not too late).

1) Universal CLASS attribute.

In HTML 3, all elements have an optional CLASS attribute
with declared value NAMES. This allows authors to encode
extra semantic information on any element, in order to
facilitate sophisticated querying, stylesheet processing,
and other future enhancements. It also allows documents
to be down-translated to HTML from special-purpose DTDs
without throwing away semantic information not supported
by HTML.

Since there are no mandatory predefined display semantics
for the CLASS attribute on current HTML 2 elements,
this attribute could be added to the DTD with no effect
on existing browsers; they can simply ignore the unrecognized

2) The <DIV> element.

HTML 2 is a very "flat" DTD; there is very little hierarchy
allowed in HTML 2 documents. HTML 3 includes a general-purpose,
recursive, block-level <DIV>ision element for tagging nested
sections of a document. It will be useful for stylesheet
processing, querying, and robust linking. It too facilitates
down-translation from other document types without discarding
semantic and structural information.

(With the ALIGN attribute, <DIV> can also perform the same
function as the Netscape-HTML <CENTER> element; however, since
ALIGN is not supported elswhere in HTML 2 I do not feel that
this is as important for early inclusion.)

<DIV> implies a line break, but if the %HTML.Recommended; switch
is turned on all of the elements which may appear inside a <DIV>
*also* cause a line break. With the caveat that it should
only be used in conjunction with %HTML.Recommended;, <DIV>
could be added to the DTD with no change to existing browsers
(the ALIGN attribute notwithstanding, but this may be deferred
to HTML 3).

3) Universal ID attribute.

In HTML 2, only <A> elements with a NAME attribute may
be used as link destinations. In HTML 3, any element may
be a link destination by specifying an ID attribute.
This is more in line with established SGML practice,
and makes linking much more flexible and robust.

Of the three changes, this is the only one that would require
modifications to existing browsers: they would have to
examine element IDs in addition to <A>nchor names when
resolving URL fragment identifiers.

An IDREF attribute on the <A> attribute would also be a welcome
addition to HTML; this would allow intra-document links
to be validated by standard SGML parsers. I do not feel
that this is as critical as the other changes, however.

Summary: These enhancements would make HTML a significantly
richer markup language, and would have little or no impact
on existing implementations. They are already proposed
for HTML 3, but the sooner they are added to an "official"
DTD the better. This will allow information providers to plan
for the future by encoding more structural and semantic
information in HTML documents and still validate these documents
against a stable DTD. From the standpoint of information
longevity, I feel that these additions are even more
important than tables, alignment, and other presentation-oriented
features already proposed for early inclusion in HTML 2.1.

If at all possible, they should be added even earlier -- to the
HTML 2.0 DTD, before the RFC is published. The change to the DTD
is relatively minor, though these additions may require
substantial editorial changes. At the very least, the
<DIV> element and universal ID and CLASS attributes should be
added to HTML 2.1.

--Joe English