Publish in HTML Tutorial el 23/05/2025 19:57
The <dl>
element represents a description list in HTML. It's used to create a list of terms and their corresponding descriptions, making it perfect for glossaries, metadata displays, or any name-value pair listings. The <dl>
element works in conjunction with <dt>
(definition term) and <dd>
(definition description) elements.
Here's how a basic definition list is structured:
When rendered, it looks like:
<dd>
elements for a single <dt>
<dt>
and <dd>
<dd>
elementsA simple glossary of web development terms:
Showing different meanings for the same term:
Creating a simple FAQ section using definition lists:
Adding items to a definition list using JavaScript:
Filtering a definition list based on user input:
The <dl>
element is a semantic HTML element that provides a perfect structure for name-value pairs. While often overlooked, it's incredibly useful for creating accessible, well-structured content like glossaries, FAQs, and metadata displays. The examples above demonstrate both basic and advanced uses, including JavaScript integration for dynamic content.
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 ...