Using Lists in HTML

HTML


There are two main types of lists in HTML, ordered and unordered. An ordered list uses numbers or another method of showing the items are ordered, whereas an unordered list will use bullet points.

Ordered List

An ordered list looks like this

  1. Three
  2. Ordered
  3. Items

It is implemented using the ol tag. List items are implemented using the li tag. So the above list looks like this in HTML:

<ol>
    <li>Three</li>
    <li>Ordered</li>
    <li>Items</li>
</ol>

Unordered list

An unordered list looks like this:

  • Three
  • Unordered
  • Items

It is implemented using the ul tag. Again list items are implemented using the li tag. Meaning the above list looks like this in HTML

<ul>
    <li>Three</li>
    <li>Unordered</li>
    <li>Items</li>
</ul>