HTML <ol> tag

Updated: 09/12/2023 by Computer Hope
HTML ol tag

When writing in HTML (hypertext markup language), the <ol> tag is a block element used to designate an ordered list. It is useful for creating lists that are either numbered or alphabetical. The following sections contain information about the <ol> tag, including an example of it in use, and related attributes and browser compatibility.


If you wanted to create a bullet list or unordered list, use the <ul> tag.

Example of <ol> code

<h3>Ordered list</h3>
<li>First numbered item</li>
<li>Second numbered item</li>
<li>Third numbered item</li>
<h3>Start at number 5</h3>
<ol start="5">
<li>Fifth numbered item</li>
<li>Sixth numbered item</li>
<li>Seventh numbered item</li>

Each number is created using the <li> tag, which designates a list item.

Example result

Ordered list

  1. First numbered item
  2. Second numbered item
  3. Third numbered item

Start at number 5

  1. Fifth numbered item
  2. Sixth numbered item
  3. Seventh numbered item


All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <ol> tag has the following unique attributes.

Attribute Description
reversed Designates that a list should go in descending order.
start Designates the start value of an ordered list.
type Designates the type of markers to use in a list.

Deprecated attributes

In addition to the above attributes, the <ol> tag had the following deprecated attributes.

Attribute Description
compact Designates that the list should appear smaller.


Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All version All versions All versions

Browser, Compatibility, Container tag, HTML li tag, HTML ul tag, List, Web design terms