HTML Dog
Skip to navigation

HTML Tag: ol

Ordered list — a list that has a logical sequence. Used in conjunction with li, which defines the list’s items.

Optional Attributes

Attribute Description Possible values
reversed Indicates that the list items are in a descending order as opposed to an ascending order. None.
start What the first ordinal value of the list should be. Number.
type The type of list item marker.
  • 1: Decimal: 1, 2, 3, etc. (default)
  • a: Lowercase Latin alphabet: a, b, c, etc.
  • A: Uppercase Latin alphabet: A, B, C, etc.
  • i: Lowercase Roman numerals: i, ii, iii, etc.
  • I: Uppercase Roman numerals: I, II, III, etc.
Global attributes

Example


<ol>
    <li>First item</li>
    <li>Second item</li>
    <li>Third item</li>
</ol>

<ol reversed>
    <li>Third item</li>
    <li>Second item</li>
    <li>First item</li>
</ol>

<ol start="2">
    <li>Second item</li>
    <li>Third item</li>
    <li>Fourth item</li>
</ol>

<ol type="a">
    <li>First item (a)</li>
    <li>Second item (b)</li>
    <li>Third item (c)</li>
</ol>