enter image description here

How to make it so that when html validation does not get an error: Element ul ul.

Sample Wedding Menu:

<ul> <li>Starter</li> <li> <ul> <li>Starter Turtle Soup</li> <li>Caesar Salad</li> </ul> </li> <li>Main</li> <li> <ul> <li>Roast Loin of Lamb</li> <li>Sea Bass</li> <li>Vegetarian Cannelloni</li> </ul> </li> <li>Desert</li> <li> <ul> <li>Sicilian Fruit Flan</li> <li>Creme Brulee</li> </ul> </li> </ul> 

But here's what happens

enter image description here

  • With this code, I get the error: Element ul ul not allowed as child of element ul in this context. - Edgar Kiljak
  • one
    add markup to the question and not to the comment, the question is to edit the button, which allows you to edit the question - Grundy

2 answers 2

The second level list must be nested in the first level list item

 <ul> <li>Starter <ul> <li>Starter Turtle Soup</li> <li>Caesar Salad</li> </ul> </li> <li>Main <ul> <li>Roast Loin of Lamb</li> <li>Sea Bass</li> <li>Vegetarian Cannelloni</li> </ul> </li> <li>Desert <ul> <li>Sicilian Fruit Flan</li> <li>Creme Brulee</li> </ul> </li> </ul> 

    Like this

     <ul> <li><div>Sample Wedding Menu: </div></li><ul><li>Starter</li> <ul><li>Starter Turtle Soup</li> <li>Caesar Salad</li> </ul></ul></ul> 

    • Doesn't work out what you need - Edgar Kiljak
    • @EdgarKiljak is obtained . The first level marker has no sublist. That you did not bring something in the question, or use a strange browser. - D-side
    • Corrected the message above - Arcadiy
    • @EdgarKiljak, the markup explains everything :) - D-side