webdevlinux - logo Web Dev Linux

HTML Ordered Lists

HTML ordered lists are referenced by numbers or letters. With this chapter, you will learn different types of ordered lists and how we use them in an HTML document.

HTML Ordered lists Ordered List type A

Try the example below

FILE : ordered-lists.html
<!DOCTYPE html>
<meta charset="utf-8" />
<title>HTML Ordered Lists</title>
<ol type="A">
<ol reversed type="i">
<ol start="6">
	<li value="2">Two</li>


Take a look at the explanation of attributes used in the example.

In an ordered list, the type attribute represents the reference type of the list. One of these values are permitted at once for the type attribute : A, a, 1, i, I
The attribute value A represents a list of Uppercase letters. (A, B, C..)
The attribute value a represents a list of Lowercase letters. (a, b, c..)
The attribute value 1 represents a list of Numbers. (1, 2, 3..). This is the default value of the ordered list. In other words, If the type attribute is not declared then it represents as a list of numbers.
The attribute value I represents a list of Uppercase roman numbers. (I, II, III..)
The attribute value i represents a list of Lowercase roman numbers. (i, ii, iii..)
You can use the start attribute only in a list of numbers (type="1"). Attribute value tells the starting number of the list.
The reverse attribute is used to get a descending list. It can be used in any type of ordered lists.
The value attribute is used to change the numbering order of a numeric list.