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).

| 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
| 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.
| LIVE PREVIEW
  1. third item
  2. fourth item
  3. fifth item
    • subitem A
    • subitem B

References