Ordered List

Ordered List in HTML <OL>

Ordered list also called as Numbered list, is used to present a numbered list of item in the order of importance or the item (paragraph) is marked with a number.

An ordered list must begin with the <OL> followed by an <LI> list item tag.

Example: An HTML document orderedList.html shows the use of Ordered List

An Ordered List
<H1><U> Various Terms Used In Internet</U></H1>
<LI> WWW-World Wide Web
<LI> URL-Uniform Resource Locator
<LI> HTTP-Hypertext Transfer Protocol
<LI> FTP-File Transfer Protocol
<LI> HTML-Hypertext Markup Language

Attributes of <OL> tag:

COMPACT : render a list in compact form.

TYPE : allows marking list items with different types. By default the list Item markers are set to numbers 1,2,3… so on.

Other values of TYPE attribute are:

Type = A
Capital letter eg. A, B, C………
Type = a
Small letter eg. a, b, c,………
Type = I
Uppercase Roman Numbers eg. I, II, III……
Type = i
Lowercase Roman Numbers eg. i, ii, iii……
Type = 1
eg. 1, 2, 3………….

START : used for lists that need to start at values other than 1. START always specified in default numbers, and is completed based on TYPE before display, For example, If START =5 it would display either an ‘E’, ‘e’, ‘V’, ‘v’, or ‘5’ based an TYPE attribute.

Example Programs

Program [1]

<!doctype html>
<title>HTML Assignment 4</title>
<body topmargin="50px" leftmargin="200px">
<h4>List of Courses</h4>
<h4>Certificate Courses</h4>
<ul type="square">
<h4>NIELIT Courses</h4>
<ol type="I">
<li>O Level</li>
<li>A Level</li>
<h4>Diploma Courses</h4>
<ol type="A">
<h4>Programming Courses</h4>
<ol start="11">
<li>C Programming</li>
<li>Data Structure using C</li>
<h4>Web Designing Courses</h4>
<li value="11">Java Script</li>
<li value="21">MySQL</li>

View Solution

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Website development Company in Allahabad