Lesson HTML List
Lesson HTML List
INTRODUCTION:
Sometimes information of web page needs to be published in a list or list form. That is, list items
need to be numbered or expressed in bullet point form. Also web pages have link with other pages
and we can add audio and video on them. In this lesson we are going to present them.
Ordered List
Unordered List
Description List
1- Ordered List:
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
In this case the <li>… </li> tags are written as nested within the <ol>… </ol> tag. The order
of the list items is determined by the “type” attribute in the <ol>… </ol> tag. If no “type”
attribute is specified then a Numbered list is created.
In the case of type = “A”, if start = “3”, ordering will start from C.
1 <html>
2 <body>
3 <ol start="5">
4 <li>Coffee</li>
5 <li>Tea</li>
6 <li>Milk</li>
7 </ol>
8
9 <ol type="A" start="4">
10 <li>Coffee</li>
11 <li>Tea</li>
12 <li>Milk</li>
13 </ol>
14 </body>
15 </html>
2- Unordered List:
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
In this case the <li>… </li> tags are written as nested within the <ul>… </ul> tag. Bullet
point of the list items is determined by the “type” attribute in the <ul>… </ul> or <li>..</li>
tag. If no “type” attribute is used then the list item will be marked to a bullet disk default.
See the following HTML code for creating following different unordered lists:
3- Nested List:
When a list inside another list then it is called Nested List. In this case, the ordered list may
contain an unordered list and the unordered list may contain an ordered list. Again, an ordered
list may contain an ordered list and an unordered list may contain an unordered list.
See the following HTML code for creating following nested list:
1 <html>
2 <body>
3 <ol type="1">
5 <ul type="square">
6 <li>Linear</li>
7 <li>Tree</li>
8 <li>Web linked</li>
9 <li>Hybrid</li>
10 </ul>
12 <ol type="i">
13 <li>Static</li>
14 <li>Dynamic</li>
15 </ol>
16 </ol>
17 </body>
18 </html>
See the following HTML code for creating following nested list:
1 <html>
2 <body>
5 <ul type="square">
6 <li> True/False</li>
8 </ul>
9 <li> English Second Paper</li>
10 <ul type="circle">
12 <ol type="a">
13 <li>Article</li>
14 <li>Narration</li>
15 <li>Preposition</li>
16 </ol>
18 </ul>
19 </ol>
20 </body>
21 </html>
4- Description List:
HTML also supports description lists. A description list is a list of terms, with a description of
each term. The <dl> tag defines the description list, the <dt> tag defines the term (name), and
the <dd> tag describes each term.
See the following HTML code for creating following description list:
1 <html>
2 <body>
4 <dl>
5 <dt>Coffee</dt>
7 <dt>Milk</dt>
9 </dl>
10 </body>
11 </html>
III- Hyperlink:
You might know that hyperlink which is a powerful means of browsing from web pages and
websites. It is developed for sending the readers or those who will perform surfing from one
web page to another without opening a new tab or window. This is in general term said to as
link and is given a reference to jump to another page or document or from one part of the
same page to another using a hypertext. The Anchor tag (<a>) in HTML can be defined as a
means to create a hyperlink.
Anchor can link your current page on which the text is being converted to hypertext via <a>
(anchor tag) to another page. This anchoring from one page to another is made possible by the
attribute “href”, which can be abbreviated as (hypertext reference).
Syntax:
<a href= “url” > link text/image </a>
The href attribute specifies the destination address of the link. The link text or image is the
visible part (Visit our HTML tutorial). Clicking on the link text or image will send you to the
specified address.
1 <html>
2 <body>
4 </body>
5 </html>
Anchor tags can be used to create hyperlink through images also. Here’s a code snippet to
show how to perform that.
2 <body>
4 </body>
5 </html>
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <audio controls>
6 </audio>
7 </body>
8 </html>
1 <!DOCTYPE html>
2 <html>
3 <body>
6 </video>
7 </body>
8 </html>
Lesson Evaluation-
I- Interview questions
a. What is hyperlink?-explain.
b. “Today hyperlink is an important element on web page” -explain.
c. “To create hyperlink ‘href’ attribute is mandatory” -explain.
d. Explain <img> tag.
e. ” ‘src’ attribute is mandatory for <img> tag” -explain.
II- Practical
1- Look the text bellow and answer the following question:
Write the HTML code for showing the above TEXT on the home page of your college’s
website.
Write HTML code for showing the above list on the web page.
Write HTML code for showing the above list on the web page.
d.Chemistry
e.Bangla
f.English
Write HTML code for showing the above list on the web page.