W3Schools.com

HTML5 <ol> Tag

Example

3 different ordered lists:

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

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

<ol reversed="reversed">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>


Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

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


Definition and Usage

The <ol> tag defines an ordered list.

Use the <li> tag to define list items.


Differences Between HTML 4.01 and HTML5

The "start" and "type" attributes were deprecated in HTML 4.01, but IS supported in HTML5.

The "reversed" attribute is new in HTML5.

The "compact" attribute was deprecated in HTML 4.01, and is not supported in HTML5.


Tips and Notes

Tip: For unordered list, use the <ul> tag.

Tip: Use CSS to style lists.


Attributes

New : New in HTML5.

Attribute Value Description
reversedNew reversed Specifies that the list order should be descending (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

Global Attributes

The <ol> tag also supports the Global Attributes in HTML5.


Event Attributes

The <ol> tag also supports the Event Attributes in HTML5.


WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE