HTMLOListElement <ol>

In addition to the additional properties defined on the standard HTMLElement interface, which are also made available to it by inheritance, the HTMLOListElement interface offers unique features for handling ordered list elements.

An ordered list is defined by the <ol> tag. A list that is arranged can be alphabetical or numerical. Each list item is described using the <li> element.

Tip: Use CSS to style lists.
Tip: For unordered list, use the <ul> tag.

Attribute Value Description Example
reversed reversed Specifies that the list order should be reversed (9,8,7...) <ol reversed> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
start number Specifies the start value of an ordered list <ol start="50"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
type 1 Default. Decimal numbers (1, 2, 3, 4) <ol type="I"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
a Alphabetically ordered list, lowercase (a, b, c, d)
A Alphabetically ordered list, uppercase (A, B, C, D)
i Roman numbers, lowercase (i, ii, iii, iv)
I Roman numbers, uppercase (I, II, III, IV)

Browser Compatibility

Element Chrome Edge Firefox Safari Opera
<ol> Yes Yes Yes Yes Yes