<dl>: The Description List elementThe <dl> HTML element represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs). Show
HTML Description List | HTML Definition ListHTML Description List or Definition List displays elements in definition form like in dictionary. The <dl>, <dt> and <dd> tags are used to define description list. The 3 HTML description list tags are given below:
Output: HTMLis a markup languageJavais a programming language and platformJavaScriptis a scripting languageSQLis a query languageExplain Description Lists in HTMLA description list is a list of terms, with a description of each term. Lists in HTML are used for specifying particular information in list form. There are various types of Lists in Html such as Ordered Lists, Unordered Lists, and description Lists. Description Lists are used for:
Format of description Lists:
Syntax: <dl> Contents of the list </dl>Example 1: HTML
Output: Example 2: HTML
Output:
Article Tags :
HTML Web Technologies
HTML-Questions HTML-Tags Practice Tags :
HTML Introduction toHTML Description ListThis article describes the Description list or Definition list and how it is useful in an HTML document. So how to define a description list? In simple terms, we can say it is a list of definitions (for example, glossaries to present the information on the internet/ web page). However, the usage of the Description list is less but have some purpose. Meanwhile, this definition lists gives added value to the web page; for example, the text given on the web page explains the context in other words in helping through semantically marking up the context. By doing this, we can easily extract the structured information. A definition list is a perfect term to describe the terms, values and another glossary. Syntax: Start Your Free Software Development Course Web development, programming languages, Software testing & others <dl> There are three elements in description list, these are <dl>, <dt>, <dd>.
HTML Description List TagsA description list is one of the types of lists; they are considered a generic form of an ordered bullet list. The only difference is that no bullet icon. Note: Any definition list comprises of sequence of <dt><dd> combinations/ one-to-many relationships’ combinations. These description tags are supported in HTML4 and enhanced with new terms in HTML5 as more name-value pairs. It makes an association link between question and answers. Type 1: Single definition term and definition togetherExample #1 <!DOCTYPE html> Output: Example #2 <html> Output: Type 2: Single description along with multiple termsExample# 1 <!DOCTYPE html> Popular Course in this category HTML Training (12 Courses, 19+ Projects, 4 Quizzes)12 Online Courses | 19 Hands-on Projects | 89+ Hours | Verifiable Certificate of Completion | Lifetime Access | | 4 Quizzes with Solutions 4.5 (8,327 ratings) Course Price View Course Related Courses Bootstrap Training (2 Courses, 6+ Projects)XML Training (5 Courses, 6+ Projects)CSS Training (9 Courses, 9+ Projects)Output: Next, we shall use the ‘lang’ attribute in the <dl> where the terms use different languages. These attributes put out ISO language code as its two-letter value. Example# 2 <!DOCTYPE html> Output: Type 3: Single term describing multiple descriptionsExample <html> Output: Type 4: Multiple Terms and Multiple DescriptionsExample <!DOCTYPE html> Output: Type 5: Definition List using Style AttributeHere style attribute is indicated for the colors to highlight the description terms. Example #1 <html> Output: Using the <dfn> tag, it is understood that the nearby text is assigned to be the definition of the term. Example #2 <!DOCTYPE html> Output: Type 6: Placing Background color for the Description ListBelow Examples Shows the Content with background color By using the attribute ‘bgcolor’. Example <html> Output: Conclusion –HTML Description ListWe hope this article on Definition lists or can be said as Glossary Lists has guided to demonstrate some of the available uses definition lists can be put to. We have seen a basic understanding of how these can be used to develop useful co-operation between snippets of information. For instance, google glossary gives how meaningful information can be marked up and can be used on web page in many ways. They have future functionality whereby some websites use semantic to present beauty to their data and reuse the given information so simple and flexible. Recommended ArticlesThis has been a guide to HTML Description List. Here we also discuss the introduction to HTML Description List, their syntax, and different HTML Description List Tags types. You may also have a look at the following articles to learn more–
HTML Training (12 Courses, 19+ Projects, 4 Quizzes) 12 Online Courses 19 Hands-on Projects 89+ Hours Verifiable Certificate of Completion Lifetime Access 4 Quizzes with Solutions Learn More 1 Shares Share Tweet Share HTML ListsIn this tutorial you will learn how to create different types of lists in HTML. 10 ListsContents
|