0% found this document useful (0 votes)
80 views

HTML (Ordered List)

The document discusses various types of lists that can be used in HTML including ordered, unordered, and definition lists. It provides examples of how to create lists using HTML tags like <ol>, <ul>, and <li> and how to customize lists using attributes like type, start, and reversed. Various code snippets are given that demonstrate how to create lists to display names, languages spoken in states, sense organs, and sports in reverse numbered order.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

HTML (Ordered List)

The document discusses various types of lists that can be used in HTML including ordered, unordered, and definition lists. It provides examples of how to create lists using HTML tags like <ol>, <ul>, and <li> and how to customize lists using attributes like type, start, and reversed. Various code snippets are given that demonstrate how to create lists to display names, languages spoken in states, sense organs, and sports in reverse numbered order.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

USING LISTS, IMAGES AND LINKS

Q1)What is list?
Ans) A list is the most efficient way of presenting information in a precise manner.

Q2) What are the different types of list supported by HTML?


Ans) The different types of lists in HTML are:-
1)Ordered list
2)Unordered list
3)Definition list
Q3) Define Ordered list.
Ans) The Ordered list is used to display the list of items in a specific order. It indents and gives a number to each item in
the list, that is why it is also known as the Numbered list.
The list begins and ends with <OL> and </OL> tags respectively. By default, the items in an ordered list will be marked
with numbers.

Q4)What is a type attribute in a <OL> tag?


Ans)To change the default item marking of an ordered list we can used the type attribute
Syntax for type attribute
<OL TYPE= “VALUE”>
Value can be a NUMBERS (1,2,3…), UPPERCASE LETTERS(A,B,C….), LOWERCASE LETTERS(a,b,c….), UPPERCASE ROMAL
NUMBERS(I,II,III….., LOWERCASE ROMAN NUMBER(I,ii,iii…….)

Q6) Define <LI> tag


Ans) <LI> tag is used to display the listed items in an ordered and unordered list.
It is optional to use the closing tag in <LI>.

Q7) Write a HTML code to display the name of any 3 of your best friends using ordered list.
<HTML>
<HEAD>
<TITLE> CODING BASED ON ORDERED LIST</TITLE>
</HEAD>
<BODY BGCOLOR= "YELLOW">

<H4>HOUSE OF SATURDAY ACTIVITY </H4>

<OL>
<LI>MOZ </LI>
<LI>JYOTI </LI>
<LI>TEJAS </LI>
</OL>

</BODY>
</HTML>

Q8) Write a HTML code to display the name of the HOUSE of Saturday activity using the attribute of lower case roman
number in ordered list.
<HTML>
<HEAD>
<TITLE> CODING BASED ON ORDERED LIST</TITLE>
</HEAD>
<BODY BGCOLOR="YELLOW">
<H4>HOUSE OF SATURDAY ACTIVITY </H4>

<OL TYPE="i">
<LI>HOPE HOUSE </LI>
<LI>LOVE HOUSE </LI>
<LI>UNITY HOUSE </LI>
<LI>PEACE HOUSE </LI>
</OL>

</BODY>
</HTML>
Q9) Write a HTML code to display the name of the capital of any 5 state in India using the attribute of uppercase letters.
<HTML>
<HEAD>
<TITLE> CAPITAL </TITLE>
<HEAD>

<BODY BGCOLOR="PINK">

<H5>CAPITALS OF ANY 5 STATES OF INDIA </H5>

<OL TYPE="A">
<LI> UTTAR PRADESH - LUCKNOW </LI>
<LI> BIHAR - PATNA </LI>
<LI> WESTBENGAL - CALCUTTA </LI>
<LI> GOA - PANAJI </LI>
<LI> RAJASTHAN - JAIPUR </LI>
</OL>
</BODY>
</HTML>

Q10) Write a HTML code to display the name of any 5 state along with the language they speak in India using the
attribute of lower case roman number.
<HTML>
<HEAD>
<TITLE> STATES OF INDIA</TITLE>
</HEAD>
<BODY BGCOLOR="YELLOW">
<H4> LANGUAGES AND CAPITALS OF STATES</H4>

<OL TYPE = "i">


<LI> UTTAR PRADESH - HINDI </LI>
<LI> WEST BENGAL - BENGALI </LI>
<LI> PUNJAB - PUNJABI </LI>
<LI> BIHAR - BIHARI </LI>
<LI> ASSAM - ASSAMI </LI>
</OL>
</BODY>
</HTML>

Q11) Write a HTML code to display sense organs in the order, numbering from 5 using ordered list and the start
attribute
Eyes, Nose, Ears, Tongue, Skin
<HTML>
<HEAD>
<TITLE> SENSE ORGANS </TITLE>
</HEAD>
<BODY BGCOLOR="YELLOW">
<OL START="5">
<LI>EYES </LI>
<LI>NOSE </LI>
<LI>EARS </LI>
<LI>TONGUE </LI>
<LI>SKIN </LI>
</OL>
</BODY>
</HTML>

Q12) Write a HTML code to display name of any 4 of your favorites sports numbering from 5 in reverse order using start
attribute
<HTML>
<HEAD>
<TITLE> SENSE ORGANS </TITLE>
</HEAD>
<BODY BGCOLOR="YELLOW">
<OL START="5" REVERSED>
<LI>CRICKET </LI>
<LI>FOOTBALL </LI>
<LI>TABLE TENNIS</LI>
<LI>BADMINTON</LI>
<LI>SKIN </LI>
</OL>
</BODY>
</HTML>

You might also like