**`<dt>`** must live inside a `<dl>`, and is meant purely as the 'label' half of a term/description pair — the actual explanation goes in the following `<dd>`. You can have multiple `<dt>` elements in a row before a `<dd>` if several terms share the exact same description (e.g. two synonyms for the same concept).
1Understanding <dt>
`<dt>` must live inside a <dl>, and is meant purely as the 'label' half of a term/description pair — the actual explanation goes in the following <dd>. You can have multiple <dt> elements in a row before a <dd> if several terms share the exact same description (e.g. two synonyms for the same concept).
Multiple consecutive <dt> elements before a single <dd> is valid HTML — useful for listing synonyms or aliases that share one definition.
<dl>
<dt>Frontend</dt>
<dt>Client-side</dt>
<dd>Code that runs in the user's browser.</dd>
</dl>2Practical Example
Here is a real-world application of <dt> showing how it is used in production HTML.
<!-- Term with a code example as part of a longer description -->
<dl>
<dt>Array.map()</dt>
<dd>Creates a new array by applying a function to each element, e.g. <code>[1,2,3].map(x => x*2)</code>.</dd>
</dl>3Best Practices
Follow these guidelines when working with <dt>:
1. Always follow a <dt> with at least one <dd>
2. Keep <dt> text short — it's a term/label, not the explanation itself
3. Use multiple consecutive <dt>s for true synonyms sharing one definition
Tip: Multiple consecutive <dt> elements before a single <dd> is valid HTML — useful for listing synonyms or aliases that share one definition.
<dl>
<dt>Frontend</dt>
<dt>Client-side</dt>
<dd>Code that runs in the user's browser.</dd>
</dl>