Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Ordered List
Lists

Lists are used to display lists of items and there are three types of lists


  • Ordered lists
  • Unordered lists
  • Description lists
Ordered Lists

Ol Lists are used to display ordered lists of items and ol stands for ordered list each items denoted by <li> and li stands for list item list items can be


  • Roman numbers
  • Alphabetical letters
  • Numbers
Syntax

<ol>
<li>Content</li>
<li>Content</li>
<li>Content</li>
</ol>


You can use ol lists any where within an HTML document.


Example

  1. One
  2. Two
  3. Three
Attributes
  • Type (used to define type of list like 1, i, I, a, A)
  • Start (used to define starting point of list like any number)

Lowercase Roman
Example

  1. One
  2. Two
  3. Three
Uppercase Roman
Example

  1. One
  2. Two
  3. Three
Lowercase Alphabetical Letters
Example

  1. apple
  2. banana
  3. cat
Uppercase Alphabetical Letters
Example

  1. apple
  2. banana
  3. cat
Start
Example

  1. Five
  2. Six
  3. Seven

Note:

In start attribute only use number value like if you want to start your list from 7 number then assign 7 to start list as start=7 or if your list contains alphabetical letters and you want to start your list from f then assign position number of f in alphabetical letters which is 6 to start attribute as start=6 and same process for remaining types.


Oredered list is a pair tag and output of ol element is list of elements from like you can see in above example.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Create one oredered list
  • Use Uppercase roman number type for your list
  • Start list number from 5
  • Now add only three items in list
  • Items names should be any as per your wish

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

  1. Five in Upper roman
  2. Six in Upper roman
  3. Seven in Upper roman

Don't forget ol is non empty element which means it always comes in pair.