jump

HTML: The Markup Language

olordered list # T

The ol element represents a list (or sequence) of items; that is, a list in which the items are intentionally ordered, such that changing the order would change the meaning of the list.

Permitted contents #

zero or more li elements

Permitted attributes #

global attributes
Any attributes permitted globally.
start = integer CHANGED #
The ordinal value of the first list item.
The start attribute on the ol element was deprecated in a previous version of HTML, but is no longer deprecated, as it has meaning and is not simply presentational.
reversed = "reversed" or "" (empty string) or empty NEW #
If present, indicates that the list is a descending list (…, 3, 2, 1).
If not present, indicates that the list is an ascending list (1, 2, 3, …).
type = "1" or "a" or "A" or "i" or "I" CHANGED #
Indicates the marker type to use in the list, in the cases where the marker type of matters (for example, if items in the list are meant to be referenced by their number or letter).
The type attribute on the ol element was deprecated in a previous version of HTML, but is no longer deprecated, as it has meaning and is not simply presentational.

Additional constraints and admonitions #

Tag omission #

An ol element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain flow elements

DOM interface #

interface HTMLOListElement : HTMLElement {
           attribute boolean reversed;
           attribute long start;
           attribute DOMString type;
};

Typical default display properties #

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