Definition and Usage
The <dt> tag represents the name in a group consisting of a name and a description of the name within a description list (represented using the <dl> tag).
'dt' is used as an abbreviation for 'Description Term'.
Here, the name specified using the <dt> tag refers to a term, definition, name, topic, or question, while the <dd> tag provides the description of that name.
The <dt> must only be used as content within the <dl> tag.
Examples by Purpose of Use
The following is an example demonstrating the use of the <dt> tag.
You can easily understand how the <dt> tag is used as a name for a specific purpose within a description list.
Used as the Name for Representing "Terms" or "Definitions"
<p>This is a description of HTML and CSS.</p>
<dl>
<dt><dfn>HTML</dfn></dt>
<dd>
An abbreviation for HyperText Markup Language,
it is a markup language used to create web pages.
</dd>
<dt><dfn>CSS</dfn></dt>
<dd>
An abbreviation for Cascading Style Sheets,
it is a stylesheet language used to define the style and layout of web pages.
</dd>
</dl>
Note!
As shown in the example above, using the <dfn> tag together with the <dt> tag makes it possible to clearly indicate that it represents a term within content where a term and its definition are presented together.
This is a description of HTML and CSS.
- HTML
- An abbreviation for HyperText Markup Language, it is a markup language used to create web pages.
- CSS
- An abbreviation for Cascading Style Sheets, it is a stylesheet language used to define the style and layout of web pages.
Used as the Name for Representing "Names"
<p>These are the most popular movie protagonists.</p>
<dl>
<dt>Harry Potter</dt>
<dd>
The protagonist of the "Harry Potter" series by J.K. Rowling,
a boy who experiences adventures as a wizard.
</dd>
<dt>Luke Skywalker</dt>
<dd>
A character who plays a major role in the "Star Wars" series,
a Jedi Knight with powerful abilities.
</dd>
</dl>
These are the most popular movie protagonists.
- Harry Potter
- The protagonist of the "Harry Potter" series by J.K. Rowling, a boy who experiences adventures as a wizard.
- Luke Skywalker
- A character who plays a major role in the "Star Wars" series, a Jedi Knight with powerful abilities.
Used as the Name for Representing "Topics"
<p>This describes a travel plan.</p>
<dl>
<dt>Travel Purpose</dt>
<dd>Rest, sightseeing, exploration, etc.</dd>
<dt>Travel Duration</dt>
<dd>Short trips (1–3 days), medium trips (4–7 days), long trips (8 days or more)</dd>
<dt>Travel Budget</dt>
<dd>Low budget, medium budget, high budget</dd>
</dl>
This describes a travel plan.
- Travel Purpose
- Rest, sightseeing, exploration, etc.
- Travel Duration
- Short trips (1–3 days), medium trips (4–7 days), long trips (8 days or more)
- Travel Budget
- Low budget, medium budget, high budget
Used as the Name for Representing "Questions"
<p>These are frequently asked questions and answers.</p>
<dl>
<dt>Q: How can I purchase the product?</dt>
<dd>A: You can purchase the product through the online store or at an offline retail store.</dd>
<dt>Q: How do I use the product?</dt>
<dd>A: You can refer to the manual or check the manufacturer’s website for instructions on how to use the product.</dd>
<dt>Q: What should I do if there is a problem with the product?</dt>
<dd>A: If there is a problem with the product, please contact the manufacturer’s customer support or service center.</dd>
</dl>
These are frequently asked questions and answers.
- Q: How can I purchase the product?
- A: You can purchase the product through the online store or at an offline retail store.
- Q: How do I use the product?
- A: You can refer to the manual or check the manufacturer’s website for instructions on how to use the product.
- Q: What should I do if there is a problem with the product?
- A: If there is a problem with the product, please contact the manufacturer’s customer support or service center.
Used as the Name for Combined Purposes
<p>This is an introduction to our company.</p>
<dl>
<dt>Company Name</dt>
<dd>Our Company</dd>
<dt>Founded</dt>
<dd>July 30, 2012</dd>
<dt>Business Area</dt>
<dd>Creating socially beneficial value</dd>
<dt>Phone Number</dt>
<dd>(123) 456-7890</dd>
<dt>Business Description</dt>
<dd>A coding tutorial for everyone.</dd>
</dl>
This is an introduction to our company.
- Company Name
- Our Company
- Founded
- July 30, 2012
- Business Area
- Creating socially beneficial value
- Phone Number
- (123) 456-7890
- Business Description
- A coding tutorial for everyone.
Examples by Syntax Structure
The following is an example demonstrating the syntax structure of the <dt> tag.
You can easily understand how the <dt> tag is used as content of a specific structure within a description list.
Single Name and Single Description
<p>These are the most popular movie protagonists.</p>
<dl>
<dt>Harry Potter</dt>
<dd>
The protagonist of the "Harry Potter" series by J.K. Rowling,
a boy who experiences adventures as a wizard.
</dd>
<dt>Luke Skywalker</dt>
<dd>
A character who plays a major role in the "Star Wars" series,
a Jedi Knight with powerful abilities.
</dd>
</dl>
These are the most popular movie protagonists.
- Harry Potter
- The protagonist of the "Harry Potter" series by J.K. Rowling, a boy who experiences adventures as a wizard.
- Luke Skywalker
- A character who plays a major role in the "Star Wars" series, a Jedi Knight with powerful abilities.
Multiple Names and Single Description
<dl>
<dt>United States</dt>
<dt>United States of America</dt>
<dd>A federal republic consisting of 50 states and 1 federal district.</dd>
</dl>
- United States
- United States of America
- A federal republic consisting of 50 states and 1 federal district.
Single Name and Multiple Descriptions
<dl>
<dt>Coffee</dt>
<dd>A beverage made from the fruit of the coffee plant</dd>
<dd>Nice! Iced Americano 😃</dd>
</dl>
- Coffee
- A beverage made from the fruit of the coffee plant
- Nice! Iced Americano 😃
Multiple Names and Multiple Descriptions
By combining the examples above, it is also possible to associate multiple names with multiple descriptions.
Wrapping with the <div> Tag for Styling
The specification states that it is a good practice to wrap a group consisting of a name (specified using the <dt> tag) and a description of the name (provided using the <dd> tag) with the <div> tag to assist with styling.
<style>
.dl-item {
padding: 1em;
border-radius: 1em;
background-color: beige;
}
.dl-item + .dl-item {
margin-top: 1em;
}
.dl-item dt {
font-weight: 600;
margin-bottom: 0.3em;
}
.dl-item dd {
margin: 0;
}
</style>
<dl>
<div class="dl-item">
<dt>Name</dt>
<dd>John Doe</dd>
</div>
<div class="dl-item">
<dt>Year of Birth</dt>
<dd>2002</dd>
</div>
<div class="dl-item">
<dt>Place of Birth</dt>
<dd>Los Angeles, United States</dd>
</div>
<div class="dl-item">
<dt>Favorite Color</dt>
<dd>Blue</dd>
</div>
</dl>
- Name
- John Doe
- Year of Birth
- 2002
- Place of Birth
- Los Angeles, United States
- Favorite Color
- Blue
Things to Keep in Mind
Review the elements that are not permitted as content within the <dt> tag.
Specific elements such as the <header>, <footer>, and Sectioning content, as well as content like headings, must not be included.
These elements are typically used to represent document sections or to organize the overall document structure.
Technical Summary
Browser Compatibility
| Tag |
Desktop Chrome
|
Desktop Edge
|
Desktop Firefox
|
Safari
|
|---|---|---|---|---|
<dt>
|
1 | 12 | 1 | 4 |
Specifications
| Specification | |
|---|---|
<dt>
|
HTML Standard #the-dt-element |