From http://www.w3schools.com (Copyright Refsnes Data)

HTML <ol> tag


Example

An ordered HTML list:

<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Try it yourself!


Definition and Usage

The <ol> tag is used to create an ordered list.

The list can be numerical or alphabetical.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The <ol> tag is supported in all major browsers.


Differences Between HTML and XHTML

The "compact", "start" and "type" attributes of the ol element were deprecated in HTML 4.01, and are not supported in XHTML 1.0 Strict DTD.


Tips and Notes

Tip: Use CSS to define the type of list.


Optional Attributes

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
compact compact Deprecated. Use styles instead.
Specifies that the list should render smaller than normal
TF
start number Deprecated. Use styles instead.
Specifies the start point in a list
TF
type 1
A
a
I
i
Deprecated. Use styles instead.
Specifies which kind of bullet points will be used
TF

Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.


From http://www.w3schools.com (Copyright Refsnes Data)