HTML Ordered List

 

2. Ordered List (<ol>)

An ordered list creates a list of items with numbers or letters.

Basic Syntax:

<ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol>

Attributes of <ol>:

  • type: Specifies the numbering style. Possible values:
    • 1 (default: numbers)
    • A (uppercase letters)
    • a (lowercase letters)
    • I (uppercase Roman numerals)
    • i (lowercase Roman numerals)

Example with type:

<ol type="A"> <li>Uppercase Letter</li> <li>Another Uppercase Letter</li> </ol>
  • start: Specifies the starting number or letter for the list.

Example with start:

<ol type="I" start="5"> <li>Starts at V</li> <li>Next is VI</li> </ol>
  • reversed: Reverses the numbering order.

Example with reversed:

<ol reversed> <li>Third</li> <li>Second</li> <li>First</li> </ol>

Comments

Popular posts from this blog

Introduction to Computer

History of Computer

Computer Generation