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.
■ <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>
<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
1 comments:
commentspanu
Reply