Warning:
This wiki has been archived and is now read-only.

Elements/ol

From HTML Wiki
Jump to: navigation, search

<ol>

The <ol> element represents the ordered list.

Point

  • Ordered list:
    • 1. 2. 3.
    • a. b. c.
    • i. ii. iii.

etc.

  • The items of the list are the li element child nodes of the ol element, in tree order. [Example A]

HTML Attributes

  • reversed
    Changes into the descending order list, if present. [Example B]


  • start = valid integer
    Specifies the ordinal value of the first list item. [Example C]


  • type = the kind of marker
    Specifies the kind of marker to use in the list. [Example D]


See also global attributes.

Examples

Example A

[try it]

<ol>
  <li>sample1</li>
  <li>sample2</li>
  <li>sample3</li>
</ol>

Example B

With the reversed attribute [try it]:

<ol reversed>
  <li>sample1</li>
  <li>sample2</li>
  <li>sample3</li>
</ol> 

Example C

With the start attribute [try it]:

<ol start="101">
  <li>sample1</li>
  <li>sample2</li>
  <li>sample3</li>
</ol> 

Example D

With the type attribute [try it]:

<ol type="lower-alpha">
  <li>sample1</li>
  <li>sample2</li>
  <li>sample3</li>
</ol> 


HTML Reference

The HTML5 specification defines the <ol> element in 4.5.5 The ol element.