HTML Description Lists

An HTML Description List (or Definition List) is used to display a list of terms and their descriptions, similar to a dictionary format. It uses three main tags:

   <dl> : Defines the description list.

   <dt> : Defines a data term (the term being described).

   <dd> : Defines a data definition (the description of the term)

Example:

<!DOCTYPE html>
<html>
<head>

<title>Description List Example</title>

</head>
<body>

<h3>Definition List Example</h3>

<dl>
<dt>HTML</dt>
<dd>HTML stands for HyperText Markup Language. It is used to create web pages.</dd>
<dt>CSS</dt>
<dd>CSS stands for Cascading Style Sheets. It is used to style the appearance of web pages.</dd>
<dt>JavaScript</dt>
<dd>JavaScript is a programming language used to make web pages interactive.</dd>
</dl>

</body>
</html>

Output:

Definition List Example

HTML
HTML stands for HyperText Markup Language. It is used to create web pages.
CSS
CSS stands for Cascading Style Sheets. It is used to style the appearance of web pages.
JavaScript
JavaScript is a programming language used to make web pages interactive.

explaination:

<dl>: This tag encloses the entire description list.

<dt>: This tag represents a term in the list. Each <dt> tag should be followed by one or more <dd> tags that provide the description.

<dd> This tag provides a description or definition for the preceding term.