HTML <ol> tag
Definition and Usage
The <ol> tag defines the start of an ordered list.
Differences Between HTML and XHTML
The "compact", "start" and "type" attributes of the ol element were deprecated in HTML 4.01.
The "compact", "start" and "type" attributes of the ol element are not supported in XHTML 1.0 Strict DTD.
Tips and Notes
Tip: Use styles to define the type of list.
Example
| Source |
Output |
<ol>
<li>Coffee</li>
<li>Tea</li>
</ol>
|
- Coffee
- Tea
|
Optional Attributes
DTD indicates in which DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
| Attribute |
Value |
Description |
DTD |
| compact |
compact_rendering |
Deprecated. Use styles instead |
TF |
| start |
start_on_number |
Specifies the number to start on. Deprecated. Use styles instead |
TF |
| type |
A
a
I
i
1 |
Specifies the type of the list. Deprecated. Use styles instead |
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.
Try-It-Yourself Demos
An ordered list
An ordered list.
Want To Be A Web Master?
If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).
MaximumASP offers seven different configurations of dedicated servers to meet your Windows and .NET hosting needs.
Hosted on our multi-tiered Enterprise Class network, these servers provide the performance, security and reliability
you need to host your high end web sites and applications.
Visit MaximumASP
|