Skip to content

Lists

  • Lesson
  • 1 min read
  • 1 of 6 in this chapter

Lists

There are two types of lists in HTML: ordered lists and unordered lists. The entire list is enclosed in the list tags (ol for an ordered list or ul for an unordered one), and each list element is enclosed in li tags, like this:

HTML
<ol>
    <li>Item one</li>
    <li>Item two</li>
    <li>Item three</li>
</ol>

<ul>
    <li>Item</li>
    <li>Another item</li>
    <li>One more item</li>
    <li>Hey look, it's another item</li>
</ul>