Nesting List

NESTING LISTS


HTML allows nesting of lists any kind of list can be nested inside any other list.
For Example, an ordered list can be nested within an unordered list, or an ordered list can be nested within another ordered list.



<!DOCTYPE html>
<html>
<body>

<h2>A Nested List</h2>
<p>List can be nested (lists inside lists):</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:

A Nested List

List can be nested (lists inside lists):
  • Coffee
  • Tea
    • Black tea
    • Green tea
  • Milk

Comments

Popular posts from this blog

Headings In HTML

Introduction and Format of HTML

Font Tag