HTML <ol> Tag

Description

The <ol> HTML element sets up a numbered list. Each list item must begin with <li>. If a stylesheet is applied to <ol>, then the <li> elements inherit these properties.

Properties

Permitted Parents
Any element that accepts flow content
Content
One or more <li> elements
Start/End Tags
Start tag: required, End tag: required

Example

<ol>
<li>Mouse</li>
<li>Cat</li>
<li>Dog</li>
</ol>

Attributes

Attribute Definition
compact Renders the list in a more compact way.
reversed Specifies that the list order should be descending (9,8,7...)
start Specifies what number to start numbering from.
type Specifies the type of bullet.

Possible values:
  • A
  • a
  • I
  • i
  • 1

Global Attributes

The <ol> tag also supports the Global Attributes in HTML5

Event Attributes

The <ol> tag also supports the Event Attributes in HTML5

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
Yes12Yes1YesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYesYes

Last updated by CSSPortal on: 6th December 2019