Page 69 - Computer - 8
P. 69
Ordered List Tag <ol>...</ol>
The <ol> and </ol> tags are used to create an ordered list. Each item in the list is specified with the <li>
and </li> tags.
By default, Arabic numerals (1, 2, 3, ...) are used to number items in the list. You can use lower- or upper-case
Roman numerals (i, ii, iii, ..., or I, II, III, ...) or lower- or upper-case alphabets (a, b, c, ..., or A, B, C, ...) to
number the items in the list.
The list properties used for an ordered list are described in the given table.
Property Description Value(s) Example
list-style-type Lets you specify the type of decimal (default) list-style-type: lower-roman
list item marker. lower-roman list-style-type: upper-roman
upper-roman list-style-type: lower-alpha
lower-alpha list-style-type: upper-alpha
upper-alpha
list-style-position Lets you specify the position inside list-style-position: inside
of the list item marker outside list-style-position: outside
list-style Lets you specify all list list-style-type list-style: upper-alpha
properties in one declaration. list-style-position inside
Knowledge Discovery Subject Enrichment
To start a numbered list with a number other than ‘1’, add the start attribute to the <ol> tag. For example,
to start a numbered list with number ‘5’, specify the tag as <ol start = 5>.
Lab Activity 4
To create an ordered list. Experiential Learning
1. Open Notepad and create the HTML document as shown below.
<!DOCTYPE html> 2. Open the HTML document in Microsoft Edge.
<html>
<head> <title> Ordered List </title> </head>
<style type= “text/css”>
ol {list-style-position: outside; list-style-
type: decimal}
h1 {font-family: Courier New; color: green;
text-align: left; font-size: xx-large}
li {font-family: Calibri; color: blue; font-
size: x-large}
</style>
<body>
<h1> Steps to Develop an App </h1>
<ol>
<li> Defining the App </li>
<li> Research </li>
<li> Creating a Prototype </li>
<li> Technical Feasibility Study </li>
<li> Developing the App </li>
<li> Testing and Debugging </li>
<li> Publishing the App </li>
</ol>
</body>
</html>
DESCRIPTION LIST
A Description list is a list of terms along with a description of each term. Description lists are used for
preparing online catalogues, dictionaries, and glossaries of terms.
67