HTML Tags: Lists

These are the HTML tags you use to make lists.

TagTypeDescription
<ul>BlockCreates an unordered list
<ol>BlockCreates an ordered list
<li>OtherDefines a list item

<ul>

Creates an unordered list (unnumbered).

<ul>
  <li>Apple</li>
  <li>Banana</li>
  <li>Orange</li>
</ul>
| LIVE PREVIEW
  • Apple
  • Banana
  • Orange

<ol>

Creates an ordered list (numbered).

Possible attributes
  • type=[...] — numbering type. Can be:
    • 1 (numbers: 1, 2, 3, ...)
    • a (lowercase letters: a, b, c, ...)
    • A (uppercase letters: A, B, C, ...)
    • i (lowercase Roman: i, ii, iii, ...)
    • I (uppercase Roman: I, II, III, ...)
  • start=[...] — from what number the list starts (always use arabic numeral like 1, 2, 3 for the value regardless of type)
  • reversed — start numbering in reverse order
<ol>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
</ol>
| LIVE PREVIEW
  1. One
  2. Two
  3. Three

<li>

Defines a list item. It must be put inside <ol> or <ul>.

You can create nested list by putting <ol> or <ul> inside <li>.

Possible attributes
  • value=[...] — set current numeral value for <ol> (always use arabic numeral like 1, 2, 3 for the value). The next list item will continue numbering from this value.
<ol type="I">
  <li value="3">third item</li>
  <li>fourth item</li>
  <li>
    fifth item
    <ul>
      <li>subitem A</li>
      <li>subitem B</li>
    </ul>
  </li>
</ol>
| LIVE PREVIEW
  1. third item
  2. fourth item
  3. fifth item
    • subitem A
    • subitem B

References