Unit 1. HTML 4
Unit 1. HTML 4
▶ List Tag
▶ Unordered list(ul)
▶ Ordered list(ol)
li (list item)
▶ Attributes of ul
(type), ol(type,
start)
▶Definition lists:
dl, dt and dd
List Tag
▶ Lists are used to group together related points of information so they
are clearly associated with each other and easy to read.
<ul> − An unordered list. This will list items using plain bullets.
<ol> − An ordered list. This will use different schemes of numbers
to list the items.
<dl> − A definition list. This arranges items in the same way as they
are
arranged in a dictionary.
The HTML <li> tag represents a list item in ordered and unordered
lists.
The <li> tag is placed inside either a <ol> tag or a <ul> to represent
each individual item within that list.
Unordered list(ul) Tag
▶ Unordered lists are used when a set of ▶ An example is a shopping list:
items can be placed in any order(randomly).
• milk
▶ This list appears with a bullet symbol
• bread
(by default)
• butter
▶ It starts with <UL>tag
• coffee beans
▶ Each list item starts with <LI> tag
HTML CODE
▶ It is a container tag
<ul>
▶ Syntax: <ul>
<li>bread</li>
<li>...</li>
<li>coffee beans</li>
<li>...</li>
<li>milk</li>
<li>...</li>
<li>butter</li>
</ul>
</ul>
Attributes of the UL tag
▶ ‘type’ attribute can be used to change the default bullet style for the list items
▶ There can be 3 types of bulleted list:
▶ Disc This is the default style. In this style, the list items are marked with bullets.
Syntax : <ul type = "disc"> or <ul>
▶ Circle In this style, the list items are marked with circle.
Syntax : <ul type = "circle">
▶ square In this style, the list items are marked with square.
Syntax : <ul type = "square“>
Ordered list(ol) Tag An example is a baking process:
OUTPUT OUTPUT
iv. Beetroot D. Beetroot
v. Ginger E. Ginger
vi. Potato F. Potato
vii. Radish G. Radish
Definition lists
▶ HTML supports a list style where entries are listed like in a dictionary
or encyclopedia.
▶ The definition list is the ideal way to present a glossary, list of terms,
or other name/value list.
li (list item) – Used to represent each individual item within that list.
▶ Attributes of ul (type)