Publish in HTML Tutorial el 23/05/2025 20:03
The <dt> (Description Term) element is used to specify a term in a description list (<dl>). It's typically paired with one or more <dd> (Description Details) elements to create a name-value group in the description list. The <dt> element is part of the HTML description list structure, which is perfect for creating glossaries, metadata displays, or any other name-value pairs.
Here's the basic structure of how <dt> is used within a <dl> element:
Here's how the above code would render:
A basic glossary implementation using <dt> and <dd>:
A single term can have multiple descriptions:
Using <dt> to display metadata or properties:
Creating a glossary dynamically with JavaScript:
An interactive FAQ section using <dt> elements that can be clicked to show/hide answers:
The <dt> element is supported by all modern browsers and has excellent backward compatibility, working even in very old browsers.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...