(PDF) HTML Lists Tag with Example :- Infinity4Education
HTML Lists
HTML
lists allow web authors to group a set of related items in lists.
Example
An unordered HTML list:
·
Item
·
Item
·
Item
·
Item
An ordered HTML list:
1.
First item
2.
Second item
3.
Third item
4.
Fourth item
Unordered HTML List
The
list items will be marked with bullets (small black circles) by default:
Example
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered HTML List
The
list items will be marked with numbers by default:
Example
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
HTML Description
Lists
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:
Example
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
Comments
Post a Comment