Re: Type Attibute for LI element.

Jukka Korpela (jkorpela@cc.hut.fi)
Tue, 3 Feb 1998 09:41:01 +0200 (EET)


Date: Tue, 3 Feb 1998 09:41:01 +0200 (EET)
From: Jukka Korpela <jkorpela@cc.hut.fi>
To: www-html@w3.org
In-Reply-To: <Pine.SOL.3.95q.980202202654.29851B-100000@wronski.math.uwaterloo.ca>
Message-ID: <Pine.OSF.3.96.980203092228.20203B-100000@beta.hut.fi>
Subject: Re: Type Attibute for LI element.

On Mon, 2 Feb 1998, Russell Steven Shawn O'Connor wrote:

> <UL>
> <LI Type="A">foo
> </UL>
> 
> This snippet of HTML I would expect to be illegal.  I can't seem to find
> any indication in the specs saying it is. 

I assume you mean HTML 3,2 or HTML 4.0 Transitional (or HTML 4.0 Frameset)
since in HTML 2.0 and HTML 4.0 Strict the question does not arise
(there is no TYPE attribute for LI at all).

The specs say that in an LI element which is an immediate constituent
of the content of a UL element, the only allowed values for the TYPE
attribute are "disc", "square", "circle" (case insensitively, and the
quotes being optional).
See http://www.w3.org/TR/REC-html32.html#ul
and http://www.w3.org/TR/REC-html40/struct/lists.html#type-values
(to which the description of the TYPE attribute for LI refers, too).

There are technical difficulties in imposing this restriction
in a DTD. As far as the DTD is concerned, the value of a TYPE
attribute of an LI element is just a string (CDATA). Strictly
speaking this means that a validator proper must not flag your
snippet as illegal, since it formally conforms to the DTD.
A checker might, and should IMHO, issue a warning - preferable
in a style different from warning about presentational attributes
in general.

This issue will hardly be clarified in future HTML specifications,
since the TYPE attribute for LI has been deprecated and since
the whole problem was created by introducing a presentational
attribute with two radically different meanings and sets of
allowed values depending on the context.

Yucca, http://www.hut.fi/u/jkorpela/