Page 46 - Trackpad_V1_Book 7_Flipbook
P. 46
LISTS
HTML contains various tags to display items in an organised layout on a webpage. We can organise
the content on a webpage using lists. Lists are used to group related pieces of information together
so that it is convenient and easy to read. HTML supports three types of list formatting:
Ordered List Unordered List Description List
ORDERED LISTS
An ordered list is used when the items in the list are required to be in a particular order and need to
be numbered. It is also known as a numbered list. An ordered list is enclosed within the <OL> � </OL>
tag. Each item in the list is given an <LI> tag that specifies the list item. By default, it starts with numbers.
Write HTML codes to print an ordered list.
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE> Ordered List</TITLE ></HEAD>
<BODY>
<H2> List of Fruits that Grow on Trees:</H2>
<OL>
<LI>Almonds</LI>
<LI>Apples</LI>
<LI>Cherries</LI>
<LI>Coconuts</LI>
<LI>Lychee</LI>
<LI>Oranges</LI>
<LI>Olive</LI>
<LI>Persimmons</LI>
</OL>
</BODY>
</HTML>
TYPE Attribute
We can change the default item marking of an ordered list to letters and Roman numerals by
using the TYPE attribute. Syntax: <OL TYPE = "Value">
1: The items on the list will be marked in numbers.
A: The items on the list will be marked in uppercase letters.
a: The items on the list will be marked in lowercase letters.
i: The items on the list will be marked in lowercase Roman numerals.
l: The items of the list will be marked in uppercase Roman numerals.
44 Trackpad (Version 1.0)-VII

