Home > Abakada: Back to Basics > Language References > HTML Elements > OL Element
Displays lines of text as a numbered or ordered list.
HTML Syntax
<ol
class = classname
id = value
start = n
style = css_style_rules
title = text
type = 1 | a | a | i | i
>
The OL element displays an ordered, or numbered, list. The element is used with the LI element to designate the individual list items.
The default numbering style is determined by the browser, but authors can use the element’s type attribute to change the list's numbering sequence and style.
This element is a block element.
NOTE: Both start and end tags are required.
The <ol>
element supports the following attributes, in addition to global attributes common to all HTML elements.
reversed | reversed | Specifies that the list order should be reversed (9,8,7...) |
start | number | Specifies the start value of an ordered list |
type | 1, A, a, I, i | Specifies the kind of marker to use in the list |
<p>To create an ordered list. </p>
<ol>
<li>Mark the start of the list with the OL tag
<li>Mark the beginning of each list item with
the LI tag
<li>Mark the end of the ordered list.
</ol>
To create an ordered list.
- Mark the start of the list with the OL tag
- Mark the beginning of each list item with the LI tag
- Mark the end of the ordered list.
DIR, LI, MENU, UL, Using Lists in HTML