ol

The ol HTML element represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document.

Syntax

HTML

<ol attribute-name="attribute-value"></ol>

Attributes

Global

Name Value Description
reversed reversed | empty Descending list if present, ascending list if not present
start integer Ordinal value of the first list item

CSS

ol {
    display: block;
    list-style-type: decimal;
    margin: 1em 0 1em 0;
    padding-start: 40px;
}

Examples

reversed

start

CSS

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu