Nested Lists

You can combine list types and use multiple nested list elements to create hierarchically-related lists. This nesting is particularly useful for outlines or multi-part instructions, as examples.

Note Notice how the nested list is contained within the parent “list-item” element.

<ol id="ordered-list">
  <li>Ordered List Item #1.</li>
  <li>Ordered List Item #2.</li>
      <ul id="unordered-list">
          <li>Item A relating to Order List Item #2.</il>
          <li>Item B relating to Order List Item #2.</li>
      <ul>
  <li>Ordered List Item #3.</li>
  <li>Ordered List Item #4.</li>
  <li>Etc...</li>
<ol>


html list nested ordered unordered