Learn at Faragta.com

HTML ordered list - how to use <ol> tag

The HTML <ol> tag is used to define a numerical or alphabetical ordered list. Numbering of the list items can be controlled.

The li tag is used to define the list items.

Attributes

The ol tag supports the global and event attributes.

reversed
Renders the list items in reversed order
start
Defines the start value for the list items
type
Defines the type of ordering to use - alphabetical, numerical, etc. Possible values include:
  • A - uppercase alphabetical
  • a - lowercase alphabetical
  • 1 - numerical
  • I - roman numerical
  • i - roman numerical

Examples:

<ol style="list-style-type:upper-alpha"> <li>Asp.Net</li> <li>Php</li> <li>Java</li> </ol> <ol style="list-style-type:lower-alpha"> <li>Asp.Net</li> <li>Php</li> <li>Java</li> </ol>

Related HTML tags:

  • <ul> - used to define an unordered list
  • <li> - used to define list items
  • How to define list



Complete HTML References:
HTML Elements
HTML Attributes
HTML Global Attributes
HTML Event Attributes

Page Sections

Faragta.com is designed to provide web development learning materials for developers. Enjoy learning.