HTML Ordered List

 Eduaction Management 959 Lahore

Code With Jahangir 

HTML Ordered List

FREE COURSES 

FREE CERTIFICATE

HTML Ordered List

Syntax:

<ol>
// list items
</ol>

 

  • Ordered lists have a sequence.
  • They are a more like numbered list.
  • They are created by using the <ol> tag.
  • For items, we use <li> tag also known as the List Item tag.

 

Example:

<ol>
<li>Mango</li>
<li>Orange</li>
<li>Litchi</li>
</ol>

 

Output:

  1. Mango
  2. Orange
  3. Litchi

 

Setting type attribute:

For <ol> tag, the type attribute is used to specify the type of numbering we want.

There are five options:

  1. Uppercase Roman Numerals
  2. Lowercase Roman Numerals
  3. Numerals
  4. Lowercase Letters
  5. Uppercase Letters

 

Setting start attribute:

For <ol> tag, the style attribute is used to specify the starting type of numbering.

For example:

<ol type="A" start="3">
<li>Pen</li>
<li>Pencil</li>
</ol>

 

Output:

C. Pen

D. Pencil

Eduaction Management 959 Lahore

Code With Jahangir 

HTML Ordered List

FREE COURSES 

FREE CERTIFICATE

Previous Post Next Post

Contact Form