Horje
How to create Nested HTML Lists

Lists can be nested (list inside list):


Full Example of Nested HTML Lists

Note: A list item (<li>) can contain a new list, and other HTML elements, like images and links, etc.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>A Nested List</h2>
<p>Lists can be nested (list inside list):</p>

<ul>
  <li>Coffee</li>
  <li>Tea
    <ul>
      <li>Black tea</li>
      <li>Green tea</li>
    </ul>
  </li>
  <li>Milk</li>
</ul>

</body>
</html>

Output should be:

Full Example of Nested HTML Lists





Category:
Web Tutorial
Sub Category:
HTML Lists
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference