Lists

HTML <ol> element

Represents a list whose item order matters. start, reversed and type can affect numbering. Use an ordered list when sequence or rank matters, not merely to obtain numbered styling. Reversed and start control ordinal values; CSS can change markers without changing list semantics. It accepts global HTML attributes; individual global features may be inapplicable or restricted.

Formal Syntax & Structure

html syntaxhtml
<ol>  <li>Item</li></ol>

Parameters & Attributes

NameTypeDescription
reversedbooleanMakes an ordered list count downward. If start is absent, numbering normally starts at the number of list items.
startintegerSets the initial ordinal of an ordered list. The default depends on reversed; the value is numeric even when the list uses letters or Roman numerals.
type1, a, A, i, IChanges the list marker style without changing the numeric start or value.

Return Value

HTMLOListElement

Content model: li elements and script-supporting elements.

Working Example

Example Snippethtml
<!doctype html><html lang="en">  <head>    <meta charset="utf-8">    <title>HTML example</title>  </head>  <body>    <ol start="3">      <li>Review notes</li>      <li>Take a quiz</li>    </ol>  </body></html>
HTML Reference