Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <ol> type Attribute

The type attribute on a <ol> tag specifies the numbering system to use.

Options include numeric, alphabetic, and roman numerals.

The numbers appear before each item in the ordered list.

Example

#

A type attribute on an <ol> element. The attribute specifies 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 item numbering system for the 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>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides