HTML <dd> tag
The <dd> tag is used to describe a term or name in a description lists.
Type: Block Element
Syntax of <dd> tag
<dl> <dt> Term 1 </dt> <dd> Description 1 </dd> <dt> Term 2 </dt> <dd> Description 2 </dd> </dl>
The <dd> tag can't be alone like <dd> This is wrong </dd>.
Supported Browsers
| Tag | Chrome | Internet Explorer | Firefox | Safari | Opera Mini |
|---|---|---|---|---|---|
| <dd> | Yes | Yes | Yes | Yes | Yes |
Full code example
<!DOCTYPE html> <html> <head> </head> <body> <dl> <dt>HTML</dt> <dd> Hypertext Markup Language is the most common language for web developers. </dd> <dt>CSS</dt> <dd> Cascading Style Sheets is helpful in styling the HTML documents. </dd> <dt>JS</dt> <dd> JavaScript is a programming language used for dynamic websites. </dd> </dl> </body> </html>
Output on the browser
- HTML
- Hypertext Markup Language is the most common language for web developers.
- CSS
- Cascading Style Sheets is helpful in styling the HTML documents.
- JS
- JavaScript is a programming language used for dynamic websites.
More reference
In HTML 4.01, <dd> was used to describe an item in a definition list.
The <dl> tag is used to define a description list.
The <dt> tag is used to define a term to be described in a description list.
Default CSS properties of <dd> tag
dd { display:block; margin-left:40px; color:#555; }
Note: We can place other HTML elements such as <p>, <img>, <a>, etc. within a <dd> tag.
