W3C home > Mailing lists > Public > www-validator@w3.org > September 2002

Re: bug report (corrected :-)

From: Olivier Thereaux <ot@w3.org>
Date: Thu, 26 Sep 2002 19:32:55 +0900
To: Kevin McManus <k.mcmanus@gre.ac.uk>
Cc: www-validator@w3.org
Message-ID: <20020926103255.GA17723@w3.mag.keio.ac.jp>

Hi Kevin.
(thanks for your corrections, I forwarded your mail to the list this
time.)

On Thu, Sep 26, 2002, Kevin McManus wrote:
> Hi www-validator@w3.org
> 
> I believe that you have a bug in your validator
> 
> IMHO the 18 lines of valid HTML4.01 at the following URL clearly
> illustrates a bug with nested lists....
> 
> http://staffweb.cms.gre.ac.uk/~k.mcmanus/ListTest.html

The validator is right. 

I agree that the HTML spec is unclear about nested lists (only a
deprecated example without closing tags...) but if you look at the DTD
you will see that <ul> does not accept anything but <li> as a child,
hence if you want to nest lists you have to make <ul> a child of <li>,
as in:

<ul>
   <li>foo</li>
   <li>
	<ul>
	   <li>bar</li>
	   <li>zog</li>
	</ul>
   </li>
</ul>

This is the proper way to do nested lists in HTML 4.01.

Regards,
-- 
Olivier Thereaux - W3C
http://www.w3.org/People/olivier | http://yoda.zoy.org
Received on Thursday, 26 September 2002 06:32:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:04 GMT