XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / ol

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

ol

HTML 4.01 | HTML 5

<ol> ... </ol>

Defines an ordered, numbered list consisting of one or more list items (li). The user agent inserts the numbers automatically.

Start/end tag

Required/required

Attributes

Core, internationalization, events, global HTML 5 attributes

  • compact (compact="compact" in XHTML)

    Deprecated. Not in HTML 5. Displays the list as compactly as possible. The attribute compact is supported by few browsers.

  • reversed (reversed="reversed" in XHTML)

    HTML 5 only. Reverses the numbering order so that the highest value comes first and the lowest last.

  • start="Zahl"

    Deprecated. Part of HTML 5. Starts numbering at Zahl instead of 1.

  • type="1|A|a|I|i"

    Deprecated. Not in HTML 5. Specifies the numbering system for the list. Instead of this attribute, use the CSS property list-style-type:

    Value for type

    Resulting style

    Example sequence

    1

    Arabic numerals (default)

    1, 2, 3, 4

    A

    Uppercase letters

    A, B, C, D

    a

    Lowercase letters

    a, b, c, d

    I

    Uppercase Roman numerals

    I, II, III, IV

    i

    Lowercase Roman numerals

    i, ii, iii, iv

    Table: Values for the type attribute in the ol element

Example

<ol>
  <li>Aufstehen</li>
  <li>Duschen</li>
  <li>Spaziergang mit Hund</li>
</ol>

 

> back to the alphabetical list of elements

   

 

 

 

back to top