HTML Definition List Definition and Usage
- The definition list is not a list of items. This is a list of terms and explanation of the terms. A definition list starts with the <dl> tag. Each definition-list term starts with the &dt> tag. Each definition-list definition starts with the &dd> tag.
- Inside a definition-list definition <dd> tag you can put paragraphs, images, links, other lists information etc.
- Definition list is use for create glossary list.
- <dl> tag is used for definition list. Between <dl> & </dl> you have to enter list of items.
- <dl> tag is a empty tag. Its use to define definition list. It does not have any attributes.
- <dl> tag have two tag <dt> and <dd> defined inside tag.
- <dt> tag is a empty tag. Its use to define definition team. It does not have any attributes. Each list item between <dt> & </dt> tag.
- <dd> tag is a empty tag. Its use to define definition define. It does not have any attributes.
Definition List using three tags.
- <dl> – Defines the start of the list
- <dt> – A term
- <dd> – Term definition
- </dl> – Defines the end of the list
Example : HTML Definition List.
<html>
<head>
<title> HTML Definition List Examples </title>
</head>
<body>
<!-- Now we are using HTML Definition List -->
<dl>
<dt>HTML <dd>Hiper Text Markup Language </dd> </dt>
<dt>URL <dd>Universal Resource Locator </dd> </dt>
<dt>W3C <dd> World Wide Web Consortium </dd> </dt>
<dt>WWW <dd> World Wide Web </dd> </dt></dl>
</body>
</html>
Output :
- HTML
- Hiper Text Markup Language
- URL
- Universal Resource Locator
- W3C
- World Wide Web Consortium
- WWW
- World Wide Web