|
Posted by Geoff Muldoon on August 25, 2006, 1:47 am
Please log in for more thread options
deko@nospam.com says...
> How do I construct an XHTML-compliant nested unordered list?
>
> This displays correctly (both FF and IE):
>
> <ul>
> <li>list item</li>
> <li>list item</li>
> <li>list item</li>
> <ul>
> <li>nested list item</li>
> <li>nested list item</li>
> <li>nested list item</li>
> </ul>
> </ul>
>
> But fails validation with this error:
>
> document type does not allow element "ul" here; assuming missing "li" start-tag.
Logically the nested list is a child of the third list item and should be
wholly contained within it.
<ul>
<li>list item</li>
<li>list item</li>
<li>list item
<ul>
<li>nested list item</li>
<li>nested list item</li>
<li>nested list item</li>
</ul>
</li>
</ul>
If it's not logically a child of that element, don't nest it. Use
blockquote if you simply want it indented further.
Geoff M
|