2

I'm trying to make an unordered-and-ordered mix lists exactly as the following example: enter image description here

The validator gives me this error:

error: Element “ul” not allowed as child of element “ol” in this context.

here is my code:

ol.numberlist{
   list-style-type: decimal;
}

ul.sqaredotlist{
    list-style-type:square;
}

ol.romanlist{
    list-style-type:lower-roman;
}
       <ol class="numberlist">
            <li>An numbered list</li>
            <li>Containing</li>
               
                <ul class="sqaredotlist">
                    <li>A dotted list</li>
                    <li>Containing</li>
                        
                        <ol class="romanlist">
                            <li>A roman numeral list</li>
                            <li>And some items</li>
                            <li>Like this</li>
                        </ol>
                
                    <li>And some items</li>
                    <li>Like this</li>
               </ul>
            
            <li>And some items</li>
            <li>Like this</li>
        </ol>

It actually works on the browser, but I want to figure out the way to fix it.

Any help will be appreciated.

Yinhao

Yinhao
  • 59
  • 1
  • 9
  • Let me try, thanks in advanced. – Yinhao Mar 21 '19 at 10:59
  • Your sub, list needs to be nested in the li you want it to be a child of – Pete Mar 21 '19 at 11:01