Ol (HTML element)

From Wiki @ Karl Jones dot com
Jump to: navigation, search

In HTML, the ol element represents an ordered list.

Description

Typically, ordered-list items are displayed with a preceding numbering, which can be of any form, like numerals, letters, or Romans numerals.

This numbered style is not defined in the HTML description of the page, but in its associated CSS, using the list-style-type property.

There is no limitation to the depth and overlap of lists defined with the ol and ul elements.

Usage note: The ol and ul both represent a list of items. They differ in the way that, with the ol element, the order is meaningful.

As a rule of thumb to determine which one to use, try changing the order of the list items; if the meaning is changed, the ol element should be used, else the ul is appropriate.

Examples

<ol>
  <li>first item</li>
  <li>second item</li>
  <li>third item</li>
</ol>

See also

External links

  • ol @ w3.org
  • ol @ w3.org
  • ol @ developer.mozilla.org
  • ol @ w3schools.com