Problem Statement
Which tag is used to create a description list in HTML?
Explanation
The dl tag is used to create a description list in HTML. The dl stands for description list. Description lists are used to display terms and their definitions or descriptions. They consist of three tags working together. The dl tag is the container. The dt tag defines the term or name. The dd tag provides the description or definition. Description lists are perfect for glossaries, metadata, or any content where you have terms with corresponding descriptions. Each dt can have multiple dd elements, and you can have multiple dt and dd pairs within one dl. Description lists are less commonly used than ordered or unordered lists, but they are very useful for specific use cases. They provide semantic meaning that helps browsers and search engines understand the relationship between terms and definitions.
Code Solution
SolutionRead Only
<!-- Basic description list --> <dl> <dt>HTML</dt> <dd>HyperText Markup Language</dd> <dt>CSS</dt> <dd>Cascading Style Sheets</dd> <dt>JavaScript</dt> <dd>Programming language for web interactivity</dd> </dl> <!-- Term with multiple definitions --> <dl> <dt>Python</dt> <dd>A high-level programming language</dd> <dd>A type of snake</dd> </dl>
