Login    New User    Forgot Password    Help      

HTML Ordered Lists

GO TO INDEX

HTML lists

There are 3 different types of lists. A <ol> tag starts an ordered list, <ul> for unordered lists, and <dl> for definition lists. Use the type and start attributes to fine tune your lists accordingly.

  • <ul> - unordered list; bullets
  • <ol> - ordered list; numbers
  • <dl> - definition list; dictionary

HTML ordered lists

Use the <ol> tag to begin an ordered list. Place the <li> (list item) tag between your opening <ol> and closing </ol> tags to create list items. Ordered simply means numbered, as the list below demonstrates

HTML Code

<h4 >City</h4>
<ol>
<li>Jalandhar</li>
<li>Ludhiana</li>
<li>Amritsar</li>
</ol>

Output

City

  1. Jalandhar
  2. Ludhiana
  3. Amritsar

Start your ordered list on any number besides 1 using the start attribute

HTML Code

<h4 >City</h4>
<ol start="4">
<li>Jalandhar</li>
<li>Ludhiana</li>
<li>Amritsar</li>
</ol>

Output

City

  1. Jalandhar
  2. Ludhiana
  3. Amritsar

HTML ordered lists continued

There are 4 other types of ordered lists. Instead of generic numbers you can replace them with Roman numberals or letters, both capital and lower-case. Use the type attribute to change the numbering.

 

HTML Code

<ol type="a">
<ol type="A">  
<ol type="i">  
<ol type="I">


Output

Lower-Case Letters Upper-Case Letters Lower-Case Numerals Upper-Case Numerals
  1. Jalandhar
  2. Ludhiana
  3. Amritsar
  1. Jalandhar
  2. Ludhiana
  3. Amritsar
  1. Jalandhar
  2. Ludhiana
  3. Amritsar
  1. Jalandhar
  2. Ludhiana
  3. Amritsar



















GO TO INDEX