
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to create Definition Lists in HTML5?
A description list—previously known as a definition list—offers an organised arrangement of a term and its definition.
For defining a definition list, the following tags are used −
<dl> − This is the list of definitions. It stores terms and their definitions as tables of rows and data.
<dt> − This is the term used to define. It keeps the phrase under definition.
<dd> − This serves as the description or definition. It contains the definition of a particular term.
Using these tags,
Following are the examples…
Example
In the following example we are using <dl>, <dt>, <dd> tags to add definitions to our webpage.
<html> <body> <h1>DEFINITIONS</h1> <dl> <dt>SGML</dt> <dd>The Standard Generalized Markup Language. </dd> <dt>HTML</dt> <dd>The Hypertext Markup Language.</dd> <dd>The Markup Language You Use To Create Web Pages.</dd> <dt>XML</dt> <dd>The Extensible Markup Language.</dd> </dl> </body> </html>
Output
On executing the above script, it will display the text in two different steps: one acts as a phrase and one as a definition.
Example: Wrapping using div
In the following example, we are grouping name-value elements together using the div elements −
<html> <body> <h1>DEFINITIONS</h1> <dl> <div> <dt>TutorialsPoint</dt> <dd>Leading providers of web based tutorials on Computer Science academic subjects, Computer Languages, Management, Telecom, and other miscellaneous subjects</dd> </div> <div> <dt>Established in</dt> <dd>2006</dd> </div> </dl> </body> </html>
Output
On executing the above script, the definition lists are achieved as follows. TutorialsPoint and its definition are grouped as one while the established year is grouped as one.
- Related Articles
- How to Create and Assign Lists in Python?
- In Python how to create dictionary from two lists?
- How to create a vector of lists in R?
- How to create an array of linked lists in java?
- How to Create Navigation Links using HTML5?
- How to create nofollow link using HTML5
- How to create a rainbow using HTML5
- How to create inline frame using HTML5
- How to create Html5 compliant Javadoc in Java 9?
- How to create a transformation matrix with HTML5?
- How to define a term or name in a definition list using HTML5?
- How to create multi-column layout in HTML5 using tables?
- How to create a link with media attribute in HTML5
- How to create lists and links using jQuery EasyUI Mobile?
- How to create a context menu for an element in HTML5?
