0% found this document useful (0 votes)
48 views16 pages

Lesson 1.3

HTML has three types of lists: unordered, ordered, and definition lists. Unordered lists use bullet points to mark items and are defined with <ul> tags. Ordered lists number items and are defined with <ol> tags. Definition lists pair terms with descriptions using <dt> for the term and <dd> for the description, within a <dl> tag. Lists can be nested by placing a list inside list items.

Uploaded by

ANIMATION
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views16 pages

Lesson 1.3

HTML has three types of lists: unordered, ordered, and definition lists. Unordered lists use bullet points to mark items and are defined with <ul> tags. Ordered lists number items and are defined with <ol> tags. Definition lists pair terms with descriptions using <dt> for the term and <dd> for the description, within a <dl> tag. Lists can be nested by placing a list inside list items.

Uploaded by

ANIMATION
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Using HTML List Tags

Nested Tags
▪ Tags can be nested, which means that we can put
tags inside a pair of tags.
Syntax: <tag1> <tag2> <tag3> Text </tag3> </tag2> </tag1>
What is a List?
▪ Cambridge Dictionary stated that list is
a record of short pieces of information
usually arranged one below the other so that
they can be read easily or counted.
▪ In HTML, we have three types of list: Ordered
List, Unordered List, and Definition List.
Unordered List
▪ It is a list of items with no specific
order or sequence.
▪ It starts with the <ul> tag. Each item
in the list starts with the <li> tag
marked with a bullet.
Syntax:
<ul>
<li> Item 1 </li>
<li> Item 2 </li>
</ul>
Other Unordered List Types
Syntax Description
type = “disc” Sets the list item marker to a bullet (default)
type = “circle” Sets the list item marker to a circle

type = “square” Sets the list item marker to a square

type = “none” The list items will not be marked


Ordered List
▪ It is a list of items with a specific
order or sequence.
▪ It starts with the <ol> tag. Each item
in the list starts with the <li> tag
marked with a number.
Syntax:
<ol>
<li> Item 1 </li>
<li> Item 2 </li>
</ol>
Other Ordered List Types
Syntax Description
type = “1” The list items will be numbered with numbers (default)
type = “A” The list items will be numbered with uppercase letters.

type = “a” The list items will be numbered with lowercase letters.

The list items will be numbered with uppercase Roman


type = “I”
numerals.
The list items will be numbered with lowercase Roman
type = “i”
numerals.
Other Ordered List Parameters

Parameter type Description


reversed Numbering direction (backwards)

start Starting of the number


Definition List
▪ It is a list of items with a definition or description of each term.
▪ The <dl> tag defines the definition list, while <dt> defines the term or name,
and <dd> tag describes each term.
Syntax:
<dl>
<dt> Term </dt>
<dd> Term Definition </dd>
</dl>
Nested List
▪ We can put a list inside a list to create what we call a sub-list or nested list.
Syntax:
<ol>
<li> Item 1 </li>
<ul>
<li> Subitem 1 </li>
<li> Subitem 2 </li>
</ul>
<li> Item 2 </li>
</ol>

You might also like