HTML Definition Lists: <dl>, <dt>, <dd>

Master the semantic way to create glossaries, metadata lists, and other key-value pairs in your HTML.

Lesson ProgressStep 1 of 9
HTML
The code for websites.
CSS
Stands for Cascading Style Sheets.
Used for styling websites.
XHTML
Are markup languages.
0 EXP

Hello! Let's explore Definition Lists. They're special lists for key-value pairs, like a glossary.

The <dl> Container

The journey of a definition list begins with the <dl> tag. This stands for **"Definition List"** and acts as the main container or wrapper for the entire list.

By itself, this tag does nothing visible. Its only job is to semantically group one or more terms (<dt>) and their descriptions (<dd>). The only valid children of a<dl> tag are <dt> and <dd> elements (or a<div> used for wrapping).

<dl>
  
</dl>

System Check

What does the <dl> tag stand for?

Advanced Holo-Simulations

0 EXP

Log in to unlock these advanced training modules and test your skills.


Achievements

🏆
Glossary Guru

Construct a well-formed definition list with dl, dt, and dd.

🏗️
Structure Whiz

Correctly order terms and descriptions in a list.

✍️
Syntax Expert

Prove your mastery of definition list tag syntax.

Mission: Build a Glossary

Create a definition list for "HTML" and "CSS". Each term should have one description. Our AI assistant will provide real-time feedback.

A.D.A. Feedback:

> Awaiting input...

Challenge: Order the List

A definition list has a strict structure. Drag the elements into the correct logical order from top to bottom.

<dt>Term</dt>
<dl>
</dl>
<dd>Description</dd>

Challenge: Complete the Syntax

Fill in the missing parts of the tags to complete the definition list.

<><dt>Term</dt><>Description<></dl>

Consult A.D.A.

Community Holo-Net

Peer Project Review

Submit your "Glossary" project for feedback from other Net-Runners.

Beyond the Glossary: The Power of Definition Lists

When you need to create a list, your first instinct is probably to reach for `<ul>` (unordered lists) or `<ol>` (ordered lists). But HTML offers a third, powerful list type that's often overlooked: the **Definition List**.

A definition list isn't just for dictionary definitions. It's the semantically correct way to represent any **key-value pairs**. This structure is created using three tags:

  • <dl>: The "Definition List" container. It wraps the entire group of terms and descriptions.
  • <dt>: The "Definition Term". This is the "key" or the item being defined.
  • <dd>: The "Definition Description". This is the "value" or the description of the term.

Why bother? Why not just use a `<p>` tag with a `<strong>` tag for the term? The answer is **semantics**. By using<dl>, you are explicitly telling browsers, search engines, and assistive technologies (like screen readers) that there is a direct relationship between the <dt> and the <dd>. A screen reader can announce "term" before reading the <dt> and "description" before the <dd>, making the content far more accessible.

Practical Use Cases

Beyond a simple glossary, definition lists are perfect for many common UI patterns.

1. Metadata & Product Specifications

Any time you're listing features or properties, a <dl> is ideal.

<dl>
  <dt>Author:</dt>
  <dd>Jane Doe</dd>
  <dt>Published:</dt>
  <dd>October 23, 2025</dd>
  <dt>Reading Time:</dt>
  <dd>5 min</dd>
</dl>

2. Frequently Asked Questions (FAQs)

An FAQ is a perfect example of key-value pairs. The question is the term, and the answer is the description.

<dl>
  <dt>What is your return policy?</dt>
  <dd>You can return any item within 30 days of purchase.</dd>
  <dt>Do you ship internationally?</dt>
  <dd>Yes, we ship to over 50 countries.</dd>
</dl>

Advanced Grouping Rules

Definition lists are flexible. You aren't limited to a single<dt> for every <dd>.

One Term, Multiple Descriptions

<dl>
  <dt>CSS</dt>
  <dd>Stands for Cascading Style Sheets.</dd>
  <dd>A language for styling web pages.</dd>
</dl>

Both <dd> elements describe the single <dt>.

Multiple Terms, One Description

<dl>
  <dt>HTML</dt>
  <dt>XHTML</dt>
  <dd>Are markup languages for the web.</dd>
</dl>

The single <dd> describes both preceding <dt>terms.

Common Pitfalls

The structure is strict. The **only** elements allowed as direct children of a <dl> tag are <dt> and <dd> (or a<div> wrapper for grouping).

✔️ Good Practice


<dl>
  <dt>Term</dt>
  <dd>Description</dd>
</dl>

Simple, semantic, and correct.

❌ Bad Practice


<dl>
  <p>This list is for...</p>
  <dt>Term</dt>
  <dd>Description</dd>
</dl>

Invalid HTML. A `<p>` cannot be a direct child of <dl>.

Key Takeaway: If your content consists of key-value pairs, a definition list (<dl>) is almost always the right semantic choice. It improves accessibility and SEO, and with CSS, it can be styled to look however you want.

Definition List Glossary

Definition List
A semantic HTML structure used to represent a list of terms (keys) and their corresponding descriptions (values).
<dl>
The "Definition List" element. This tag acts as the main container that wraps the entire list of terms and descriptions.
<dt>
The "Definition Term" element. This tag is used for the "key" in the key-value pair (e.g., the word in a glossary, the question in an FAQ).
<dd>
The "Definition Description" element. This tag is used for the "value" that corresponds to the preceding <dt> (e.g., the definition, the answer).
Key-Value Pair
The fundamental relationship that definition lists represent. The<dt> is the key, and the <dd> is its associated value.
Grouping
The flexibility to associate multiple <dt> tags with a single <dd> tag, or a single <dt> tag with multiple<dd> tags.

About the Author

Author's Avatar

TodoTutorial Team

Passionate developers and educators making programming accessible to everyone.

This article was written and reviewed by our team of web development experts, who have years of experience teaching HTML and building robust and accessible web applications.

Verification and Updates

Last reviewed: October 2025.

We strive to keep our content accurate and up-to-date. This tutorial is based on the latest HTML5 specifications and is periodically reviewed to reflect industry best practices.

External Resources

Found an error or have a suggestion? Contact us!