HTML CSS Bootstrap JavaScript jQuery MySQL PHP Data Mining

HTML Description Lists

An HTML description list is used to display term and definition pairs — similar to a dictionary or glossary. It is the third type of list in HTML alongside unordered and ordered lists.


Description List Tags

A description list uses three tags together:

Tag Name Purpose
<dl>Description ListThe container for the whole list
<dt>Description TermThe term or name being defined
<dd>Description DataThe definition or description of the term

Basic Description List

<dl>
    <dt>HTML</dt>
    <dd>HyperText Markup Language — the standard language for creating web pages.</dd>

    <dt>CSS</dt>
    <dd>Cascading Style Sheets — used to style and layout web pages.</dd>

    <dt>JavaScript</dt>
    <dd>A programming language that adds interactivity to web pages.</dd>
</dl>

Result:

HTML
HyperText Markup Language — the standard language for creating web pages.
CSS
Cascading Style Sheets — used to style and layout web pages.
JavaScript
A programming language that adds interactivity to web pages.

Multiple Descriptions for One Term

A single <dt> can have multiple <dd> elements for multiple definitions:

<dl>
    <dt>Apple</dt>
    <dd>A fruit that grows on trees.</dd>
    <dd>A technology company known for iPhones and Macs.</dd>
</dl>

Result:

Apple
A fruit that grows on trees.
A technology company known for iPhones and Macs.

Multiple Terms for One Description

Multiple <dt> elements can share a single <dd>:

<dl>
    <dt>HTML</dt>
    <dt>Hypertext Markup Language</dt>
    <dd>The standard language for structuring web content.</dd>
</dl>

Common Use Cases

  • Glossaries — defining technical terms
  • FAQs — question as <dt>, answer as <dd>
  • Metadata — key-value pairs like product specifications
  • Dictionaries — word and its meaning

FAQ Example

<dl>
    <dt>What is HTML?</dt>
    <dd>HTML is the standard markup language for creating web pages.</dd>

    <dt>Is HTML a programming language?</dt>
    <dd>No. HTML is a markup language, not a programming language.</dd>
</dl>
Note: By default, browsers indent <dd> elements to visually separate them from the <dt>. You can adjust this spacing with CSS margin and padding.
Best Practice: Use description lists for semantically meaningful term-definition relationships. Search engines and screen readers understand this structure, making your content more accessible and well-indexed.