Monday 12 November 2012

HMTL 5, CSS3 and JavaScript for Windows 8 – What is an Ordered List?

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items are marked with numbers.

In the HTML 5 paradigm, only the following attributes are supported:

 

Attribute

Vale

Description

compact compact Not supported
reversed 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.

An example like this:
<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>
<ol start="50">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Will produce the following:

  1. Coffee
  2. Tea
  3. Milk
  1. Coffee
  2. Tea
  3. Milk

No comments: