- From: Dave Raggett <dsr@w3.org>
- Date: Sat, 21 Dec 2002 14:48:53 +0000 (GMT)
- To: www-style@waite.sunesistech.com
- cc: www-style@w3.org
On Fri, 20 Dec 2002 www-style@waite.sunesistech.com wrote: > > Hi folks, > > I've been having some problems getting pages to validate > (specifically as XHTML Transitional) when they have a nested > list in them. ex: > > <!-- begin snippet --> > > <ul> > > <li>one</li> > <li>two</li> > > <ol> > > <li>one</li> > <li>two</li> > > </ol> > > </ul> The above is invalid because the ol isn't allowed as a child of a ul element. You need to place it within an li, e.g. <ul> <li>one</li> <li>two <ol> <li>two.one</li> <li>two.two</li> </ol> </li> <li>three</li> </ul> I would also recommend avoiding "mixed content" by enclosing the list item contents in block-level elements, e.g. <ul> <li> <p>one</p> </li> <li> <p>two</p> <ol> <li>two.one</li> <li>two.two</li> </ol> </li> <li> <p>three></p> </li> </ul> -- Dave Raggett <dsr@w3.org> or <dave.raggett@openwave.com> W3C lead for voice/multimodal. http://www.w3.org/People/Raggett tel/fax: +44 1225 866240 (or 867351) +44 771 213 7629 (GSM)
Received on Saturday, 21 December 2002 09:46:03 UTC