Description lists in HTML are used to display a list of terms and their corresponding descriptions. Here’s a breakdown of the tags used:
<dl>
(Description List): Defines a description list. It’s a container for terms and their descriptions.- Example:
<dl> <dt>HTML</dt> <dd>A markup language for creating web pages.</dd> <dt>CSS</dt> <dd>A style sheet language used for describing the look of a document written in HTML.</dd> </dl>
- Output:
HTML A markup language for creating web pages. CSS A style sheet language used for describing the look of a document written in HTML.
- Example:
<dt>
(Definition Term): Defines a term or name in a description list. It is usually followed by one or more<dd>
tags.- Example:
<dl> <dt>Term 1</dt> <dd>Description for term 1.</dd> </dl>
- Example:
<dd>
(Definition Description): Defines the description or definition of the term within a description list.- Example:
<dl> <dt>Term 1</dt> <dd>Description for term 1.</dd> </dl>
- Output:
Term 1 Description for term 1.
- Example:
0 Comments
Please do note create link post in comment section