HTML <dt> tag
The <dt> tag is used to define a term/name in a description lists. In another word, it specifies an item to be described in a list.
Type: Block Element
Syntax of <dt> tag
<dl> <dt> Term 1 </dt> <dd> Description 1 </dd> <dt> Term 2 </dt> <dd> Description 2 </dd> </dl>
Supported Browsers
| Tag | Chrome | Internet Explorer | Firefox | Safari | Opera Mini |
|---|---|---|---|---|---|
| <dt> | Yes | Yes | Yes | Yes | Yes |
Full code example
<!DOCTYPE html> <html> <head> </head> <body> <dl> <dt> HTML </dt> <dd> It is the most common language for web developers. </dd> <dt> CSS </dt> <dd> It is helpful in styling the HTML documents. </dd> <dt> JS </dt> <dd> It is used to create dynamic websites. </dd> </dl> </body> </html>
- HTML
- It is the most common language for web developers.
- CSS
- It is helpful in styling the HTML documents.
- JS
- It is used to create dynamic websites.
Associated tags of <dt> tag
| Tag | Uses |
|---|---|
| <dl> | It is used to define a description list. |
| <dd> | It is used to define description of a term in a description list. |
Note: The dt tag must be always associated with <dd> and <dl> tag.
More reference
Within the <dt> element, you can put another HTML elements like <img>, <p>, <a> etc
Default CSS properties of <dt> tag
dt { display: block; }
