HTML LIST (Description List)

SEOSIKHO 02:08:00

Description List:

This type of list can have a description associated with its list items.

■ <dl> tag is used here which stands for description list.

■ It is used in pair.

■ The list items are enclosed in <dt> tag.

■ The description is enclosed in <dd> tag.


Syntax:

 <dl>
<dt>any content</dt>
<dd>any description</dd>
<dt>any content</dt>
<dd>any description</dd>
...
...
</dl>

EXAMPLE:

1 Open Notepad and copy and paste the code .


<!DOCTYPE html>
<html>
<body>
<dl><dt>First item</dt><dd>Description of first item</dd>
<dt>Second item</dt><dd>Description of Second item</dd>
<dt>Third item</dt><dd>Description of Third item</dd>
</dl>
</body>
</html>


Output:

First item
Description of first item
Second item
Description of Second item
Third item
Description of Third item


Share this

Related Posts

Previous
Next Post »