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

HTML 5 <ol> tag


Definition and Usage

The <ol> tag defines the start of an ordered list.


Differences Between HTML 4.01 and HTML 5

The "start" attribute were deprecated in HTML 4.01, in HTML 5 it is allowed.

The "compact" and "type" attributes were deprecated in HTML 4.01, and are no longer supported in HTML 5.


Tips and Notes

Tip: Use CSS to define the type of list.


Example

Source Output
<ol>
<li>Coffee</li>
<li>Tea</li>
</ol>

<ol start="50">
<li>Coffee</li>
<li>Tea</li>
</ol>

  1. Coffee
  2. Tea
  1. Coffee
  2. Tea


Attributes

Attribute Value Description 4 5
compact compact_rendering Deprecated. Use styles instead 4  
start start_on_number Specifies the number to start on. Deprecated. Use styles instead 4 5
type A
a
I
i
1
Specifies the type of the list. Deprecated. Use styles instead 4  

Standard Attributes

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title

For a full description, go to Standard Attributes in HTML 5.

Event Attributes

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

For a full description, go to Event Attributes in HTML 5.


Try-It-Yourself Demos

An ordered list
An ordered list.


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