HTML DD Tag
The <dd> tag stands for “description/details data”, and it's used to describe a term or name that has been defined using the <dt> tag. Both <dt> and <dd> are used inside a <dl> tag, which stands for description list (or definition list).
So, think of it like this:
- <dl> = container for the list
- <dt> = the term or name (like a heading)
- <dd> = the definition or description of that term
You can have multiple <dd> elements for one <dt>, or the other way around.
Syntax -
<dl>
<dt>name</dt>
<dd>description</dd>
</dl>
Example -
Scenario - Presenting definitions or detailed information
<!DOCTYPE html>
<html>
<head>
<title> DD element example.. </title>
</head>
<body>
<dl>
<dt>HTML</dt>
<dd>The language used to create websites.</dd>
<dt>CSS</dt>
<dd>The language used to style and design web pages.</dd>
<dt>JavaScript</dt>
<dd>A scripting language to add dynamic behavior to websites.</dd>
</dl>
</body>
</html>
Output -
- HTML
- The language used to create websites.
- CSS
- The language used to style and design web pages.
- JavaScript
- A scripting language to add dynamic behavior to websites.