Click here to get back home

How to construct XHTML-compliant nested list?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to construct XHTML-compliant nested list? deko 08-25-2006
Posted by deko on August 25, 2006, 1:31 am
Please log in for more thread options


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.

How can I nest a list if I can't put a <ul> within a <ul> ??

Thanks in advance.


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

Posted by deko on August 25, 2006, 2:01 am
Please log in for more thread options


> <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>

That did the trick. Thanks!

Posted by Steve Pugh on August 25, 2006, 5:53 am
Please log in for more thread options


Geoff Muldoon wrote:

> Use blockquote if you simply want it indented further.

You give good advice about proper nesting of lists and then suggest
using blockquote for indenting. You're joking, right?

Steve


Posted by Jukka K. Korpela on August 25, 2006, 9:50 am
Please log in for more thread options



> Geoff Muldoon wrote:
>
>> Use blockquote if you simply want it indented further.
>
> You give good advice about proper nesting of lists and then suggest
> using blockquote for indenting. You're joking, right?

Wasn't that obvious?

I guess we need <blockjoke> markup, the meaning of which is random
indentation and a background consisting of smileys. It should have an
optional trolling="trolling" attribute.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Similar ThreadsPosted
overlapping nested list problem in ie April 5, 2007, 12:00 pm
Double-spacing 1st List Level, but not Nested Levels July 9, 2006, 8:24 pm
How to construct a public upload/download site? January 22, 2006, 10:58 pm
Nested forms August 20, 2004, 9:53 am
nested frames October 13, 2005, 10:21 pm
RE: nested frames October 15, 2005, 5:08 am
Form and nested elements November 10, 2004, 11:57 am
Nested OBJECT frustration October 6, 2005, 8:26 pm
Nested table issues January 10, 2005, 6:16 am
CSS Problem with Nested DIVs October 14, 2005, 4:19 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap