Difference between revisions of "Ol (HTML element)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Created page with "In HTML, the '''ol''' element represents an ordered list. == Description == Typically, ordered-list items are displayed with a preceding numbering, which ca...")
 
(See also)
 
(2 intermediate revisions by the same user not shown)
Line 25: Line 25:
 
* [[HTML]]
 
* [[HTML]]
 
* [[HTML element]]
 
* [[HTML element]]
 +
* [[Li (HTML element)]]
 +
* [[Lists (HTML)]]
 +
* [[Ul (HTML element)]]
  
 
== External links ==
 
== External links ==
Line 32: Line 35:
 
* [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol ol] @ developer.mozilla.org  
 
* [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol ol] @ developer.mozilla.org  
 
* [http://www.w3schools.com/tags/tag_ol.asp ol] @ w3schools.com
 
* [http://www.w3schools.com/tags/tag_ol.asp ol] @ w3schools.com
 +
 +
 +
[[Category:HTML elements]]

Latest revision as of 18:38, 13 May 2016

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