ol

FilterElements

<ol> ... </ol>

Defines an ordered (numbered) list that consists of one or more list items (li). The user agent inserts item numbers automatically.

Start/End Tags

Required/Required

Specifications

  • HTML 4.01
  • HTML5

compact

Values: None in HTML. (compact="compact" in XHTML)
Deprecated. Not in HTML5. Displays the list as small as possible. Few browsers support the compact attribute.

reversed

Values: None in HTML. (reversed="reversed" in XHTML)
HTML5 only. Reverses the numbering sequence, from highest to lowest value.

start=

Values: number
Deprecated in HTML 4.01, but included in HTML5. Starts the numbering of the list at number instead of at 1.

type=

Values: 1 | A | a | I | i
Deprecated. Not in HTML5. Defines the numbering system for the list as follows:
Value Generated Style Sample
1 Arabic numerals (default) 1, 2, 3, 4
A Uppercase letters A, B, C, D
a Lowercase letters a, b, c, d
I Uppercase roman numerals I, II, III, IV
i Lowercase roman numerals i, ii, iii, iv
<ol>
  <li>Get out of bed</li>
  <li>Take a shower</li>
  <li>Walk the dog</li>
</ol>

Rendered Example

      
  1. Get out of bed.
  2.   
  3. Take a shower.
  4.   
  5. Walk the dog.