HTML <ol> type Attribute

The type attribute on a <ol> tag specifies the numbering system for the items in the ordered list. Options include numeric, alphabetic, and roman numerals.

Example

#

A type attribute on an <ol> element.
The attribute specifies an alphabetic numbering for the items in the list.

  1. Paris
  2. Amsterdam
  3. London
  4. Berlin
<ol type="a">
  <li>Paris</li>
  <li>Amsterdam</li>
  <li>London</li>
  <li>Berlin</li>
</ol>

Using type

The type attribute specifies the numbering to on the items in the ordered list.

Lists can be ordered by number (1,2,3), alphabetic(a,b,c) or roman numbers (I,II,III).


Syntax

<ol type="1 | a | A | i | I">

Values

#

Values Description
1 Numbers. This is default. (1, 2, 3, 4)
a Lowercase alphabet (a, b, c, d)
A Uppercase alphabet (A, B, C, D)
i Lowercase roman numerals (i, ii, iii, iv)
I Uppercase roman numerals (I, II, III, IV)

More Examples

An ordered list with uppercase roman numerals.

  1. Audi
  2. BMW
  3. Toyota
  4. Ford
<ol type="I">
  <li>Audi</li>
  <li>BMW</li>
  <li>Toyota</li>
  <li>Ford</li>
</ol>

Browser support

Here is when type support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <ol>
Guides