<dt>
A name, term, or question in a `<dl>` description list.
- Display
- block
- Closing tag
- Required
- Permitted content
- Flow content without headings, sectioning elements,
<header>, and<footer>
Example
#<dl>
<dt><dfn>Tag</dfn></dt>
<dt><dfn>Markup tag</dfn></dt>
<dd>The name of an element written in angle brackets, for example <code><p></code>.</dd>
<dt><dfn>Attribute</dfn></dt>
<dd>Extra information in the opening tag, for example <code>href</code>.</dd>
</dl>Definition and usage
#The <dt> element (from description term) holds the name from a “name and description” pair. It always sits inside a <dl> (or in a <div> inside a <dl>) and comes before one or more <dd> elements with the description.
Several <dt> elements in a row mean that all those names share the same description, which is useful for synonyms and abbreviations. Inside it you can put text, a link, or a piece of code, but not headings or sectioning elements such as <header>, <footer>, or <section>.
In glossaries it’s worth wrapping the term in <dfn>. <dt> alone only says that this is the name in a pair, while <dfn> adds the information that the term is being defined at this spot.
Syntax
#<dt>name</dt>Attributes
#This element has no attributes of its own. It supports the global attributes, such as class, id and hidden.
Default CSS
#Most browsers display this element with these default styles:
dt {
display: block;
}Browser support
#Widely available
Works in all modern browsers, phones included. You can use it without worry.
- Chrome
- Edge
- Firefox
- Safari
Good practices
#- The closing tag
</dt>can be omitted when it is immediately followed by<dt>or<dd>, but explicit closing is easier to read. - If a glossary needs a title, put a heading before the
<dl>list, not in a<dt>.
Related entries
#Practise it in lessons
#Spotted a mistake or missing an example? Write to us.