W3C home > Mailing lists > Public > www-html@w3.org > March 1998

Nested Lists

From: Fredrik Wangel <fw11ab@student.hik.se>
Date: Wed, 11 Mar 1998 11:39:24 -0500 (EST)
Message-ID: <3506BEB6.2ABEFFE6@student.hik.se>
To: www-html@w3.org
I came accross a very strange error when I ran a validation on
a page of mine using the W3C Validation Service.

I used a simple nested unordered list, which according to
the specification [2] is quite alright:
   "Lists may also be nested:"

My list was in principle constructed as follows:


The Validation Report said:
   Error at line 75:
         document type does not allow element "UL" here;
         assuming missing "LI" start-tag

I double-checked the code but it had both the start and the
optional end-tag (<li> and </li>), so I read the list section
in the specification [2] again and I could not find anything
that would indicate that my code was bad.

The only thing was that the end-tag of li is optional, so
I simply removed it and - voila - it passed the tests.

The source code, both the "bad" [3] and the "corrected" [4] one,
are available for viewing.


... and another thing:

Why is there no List Header <lh></lh> element?
It would be nice, especially with nested lists, to
have an element that can act like a header of the
list. In a visual user agent, this could simply be
rendered as bolder text. In a speaking browser,
it could have other important functions, e.g.
letting the user listen to the the list headings
first, chosing which "branch" to hear more about.

   1. Software
      * Games
      * Applications
      * Development Tools
   2. Recreation
      * Music
      * Books

(spoken) There are two topics. For Software, press 1,
for Recreation, press 2.

This might be enhanced using CSS2 and content insertion.


[1] http://validator.w3.org
[2] http://www.w3.org/TR/REC-html40/struct/lists.html
[3] http://www.bugsoft.hik.se/fw11ab/li_test_bad.html
[4] http://www.bugsoft.hik.se/fw11ab/li_test.html

Fredrik Wangel, Svedjevagen 157, SE-394 71 Kalmar, Sweden
Tel. : +46 (0)480 479191, Fax. : +46 (0)480 479165
Received on Wednesday, 11 March 1998 11:52:35 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:33 UTC