-1

i tried to check my code in a validator and it shows this message the code:

<ol>
  <li>learn html. </li>
  <li>learn css. </li>
  <li>learn python. </li>
  <li>save the world. </li>
  <ul>
    <li>be patient.</li>
    <li>improve your skills</li>
  </ul>

the error message:

"Element ol not allowed as child of element ul in this context. (Suppressing further errors from this subtree.) "

I understand what does it mean but i dont know why it doesnt allowed and how i write it without errors

I tried to allign the nesting well and didnt work ,i am a beginner in coding by the way.

isherwood
  • 58,414
  • 16
  • 114
  • 157
  • 2
    When in doubt, read the [docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#nesting_lists). – isherwood May 03 '23 at 16:16

1 Answers1

0

The inner <ul> or <ol> must be a child of a <li>: Try this:

<ol>
  <li>learn html. </li>
  <li>learn css. </li>
  <li>learn python. </li>
  <li>save the world. </li>
  <li>
    <ul>
      <li>be patient.</li>
      <li>improve your skills</li>
    </ul>
  </li>
</ol>
mykaf
  • 1,034
  • 1
  • 9
  • 12