A description list (formerly a definition list) provides an organized arrangement of terms and their definitions.
The tags of the definition list are as follows: −
− This is a definition list. It stores terms and their definitions as a table of rows and data.
- This is the term used for definition. It keeps the phrase defined.
- This is used as a description or definition. It contains definitions of specific terms.
Use these tags,
The following are examples...
The Chinese translation ofIn the example below, we use the
<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>
When the above script is executed, it will display the text in two different steps: one as a phrase and one as a definition.
In the example below, we use a div element to group name-value elements together -
<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>
When executing the above script, the definition list is as follows. TutorialsPoint and its definition are grouped together, and the year of establishment is grouped together.
The above is the detailed content of How to create a definition list in HTML5?. For more information, please follow other related articles on the PHP Chinese website!