Ordered HTML List

Share:


An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
The list items will be marked with numbers by default:

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

Ordered HTML List - The Type Attribute

The type attribute of the <ol> tag, defines the type of the list item marker:
TypeDescription
type="1"          The list items will be numbered with numbers (default)
type="A"          The list items will be numbered with uppercase letters
type="a"          The list items will be numbered with lowercase letters
type="I"          The list items will be numbered with uppercase roman numbers
type="i"          The list items will be numbered with lowercase roman numbers
 
Numbers:
<ol type="1">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Uppercase Letters:

<ol type="A">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Lowercase Letters:

<ol type="a">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Uppercase Roman Numbers:

<ol type="I">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Lowercase Roman Numbers:

<ol type="i">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Try out the Above Codes in Your Text Editor  or On The HTML Section Of Your Blog if You are a Blogger...


No comments

Sponsored

Search This Blog