Introduction
The <dt> element in HTML stands for “Description Term,” and it is used within a <dl> (Description List) element to define terms in a term-description pair. The <dt> element is typically followed by a <dd> (Description Definition) element that provides the description or definition of the term.
Here’s an example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<dl>
<dt>HTML</dt>
<dd>Hypertext Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dt>JavaScript</dt>
<dd>A programming language that enables interactive web pages</dd>
</dl>
</body>
</html>
Output :

In this example, each <dt> element represents a term (e.g., HTML, CSS, JavaScript), and the corresponding <dd> element provides the description or definition of that term.
Key points about the <dt> element:
- It is used inside a
<dl>element to mark up the terms in a description list. - It is a block-level element.
- It is often followed by one or more
<dd>elements that provide the description or definition associated with the term. - The order of
<dt>and<dd>elements within a<dl>defines the order of term-description pairs.
When creating a description list using <dl>, it’s important to maintain the semantic relationship between <dt> and <dd> elements. This allows browsers, screen readers, and other user agents to understand the structured content and present it in a meaningful way to users.