W3C home > Mailing lists > Public > www-validator@w3.org > August 2001

Re: validation problem with nested lists

From: Lloyd Wood <l.wood@eim.surrey.ac.uk>
Date: Fri, 10 Aug 2001 16:29:11 +0100 (BST)
To: Robert Latham <r.latham@miscapital.com>
cc: "'www-validator@w3.org'" <www-validator@w3.org>
Message-ID: <Pine.GSO.4.21.0108101622390.26485-100000@phaestos.ee.surrey.ac.uk>
On Fri, 10 Aug 2001, Robert Latham wrote:

> The following  nested list refuses to validate, with a missing < li> tag
> error message at start of line 6. However if  I delete the </li> tag from
> the end of line 5 it validates fine! Is this me being dim or a bug? 

You being dim.

If you're nesting list structures, you need to start the new list
inside a list element of the outer list:

<ul>
    <li>
        <ul>
            <li></li>
        </ul>
    </li>
</ul>

<dl>
    <dt></dt>
    <dd>
        <dl>
            <dd></dd>
        </dl>
    </dd>
</dl>

note how the opening and closing tags alternate...

(I've spent the last few years getting people here to hand-maintain
pages of complex nested list structures that they're responsible for.
It's been hell. I've given up on the idea of <p></p> as just too
tricky to ever get across.)

L.

<L.Wood@surrey.ac.uk>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
Received on Friday, 10 August 2001 11:29:23 GMT

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