totn HTML

HTML: <dt> tag

This HTML tutorial explains how to use the HTML element called the <dt> tag with syntax and examples.

Description

The HTML <dt> tag is used to define a term within a description list (<dl> tag) in the HTML document. After each <dt> tag within the <dl> tag, there must be at least one <dd> tag which describes the term found in the <dt> tag. The <dt> tag is also commonly referred to as the <dt> element.

Syntax

In HTML, the syntax for the <dt> tag is:

<dl>
  <dt>Term1</dt>
  <dd>Description of Term1<dd>

  <dt>Term2</dt>
  <dd>Description of Term2<dd>
</dl>

Sample Output


Attributes

Only the Global Attributes apply to the <dt> tag. There are no attributes that are specific to the <dt> tag.

Note

  • The <dt> element is found within the <body> tag and must be inside of a description list <dl> tag.
  • For each group (ie: term/description pair) in the description list, there must be at least one <dt> tag followed by at least one <dd> tag. This means that it is possible to list:

    • a single term followed by a single description
    • a single term followed by multiple descriptions
    • multiple terms followed by a single description
    • multiple terms followed by multiple descriptions

Browser Compatibility

The <dt> tag has basic support with the following browsers:

  • Chrome
  • Android
  • Firefox (Gecko)
  • Firefox Mobile (Gecko)
  • Internet Explorer (IE)
  • Edge Mobile
  • Opera
  • Opera Mobile
  • Safari (WebKit)
  • Safari Mobile

Example

We will discuss the <dt> tag below, exploring examples of how to use the <dt> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.