Jump to content

Nested Unordered Lists


Ridge_Runner

Recommended Posts

When using html nested unordered lists in an xhtml document, the error (document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag) is returned from the xhtml validator.(example)<ul> start main list<li> some text </li> <ul> start nested list <li> some text </li> </ul> end nested list<li> some more text </li> </ul> end main list(?) Is there a new way to use nested unordered lists?

Link to comment
Share on other sites

[disregard post]: The answer was that I was using one too many </li> on the nested lists.Properly nested lists means that everything within a list exists between an <li> tag and it corresponding end tag (</li>). This means that a nested list should be contained within a list item, not occur between list items.(example)<ul> <li>Item 1</li> <li>Item 2 <----------- I had an </li> here (& removed it) <ul> <li>Sub-item 1</li> <li>Sub-item 2</li> </ul> <------------------ this closes the nested list </li> <-------------------- this closes item 2 (I was missing this one) <li>Item 3</li></ul>re: http://academ.hvcc.edu

Link to comment
Share on other sites

I am glad you were able to figure it out on your own. And even more glad that you presented the solution to us all and in a easy to understand manner, so hopefully more people will benefit.By the way, welcome to the boards :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...