list in list html code example

Example 1: html lists

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

Example 2: html lists

Unordered list
<ul>
  <li>something</li>
</ul>
Ordered list
<ol>
  <li>something</li>
</ol>

Example 3: html nested list

<!-- Creat a list inside list -->

<ul>
  <li>Coffee</li>
  <li>Tea
    <!-- nested list -->
    <ul>
      <li>Black tea</li>
      <li>Green tea</li>
    </ul>
  </li>
  <li>Milk</li>
</ul>

Example 4: nested list html

<ul>
  <!-- main item list -->
  <li>Coffee</li>
  <li>Tea
    <ul>
      <!-- items nested under tea -->
      <li>Black tea</li>
      <li>Green tea</li>
    </ul>
  </li>
  <li>Milk</li>
</ul>

Example 5: list item nesting html'

<li>List Item</li>
        <li>List Item</li>
        <li>
          List Item
        </li><ul>
            <li>List Item</li>
            <li>List Item</li>
          </ul>

Tags:

Misc Example