HTML Description List
This 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:
<dl> <dt> …… </dt> <dd> ……….. </dd> </dl
There are three elements in description list, these are
- ,
- ,
- .
-
Definition list
- Definition Term – This element has been used under the definition list currently and has the inline data or the value of the dl element.
- Definition description -This element defines the data under this element are taken has block-level or either inline.
HTML Description List Tags
A 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 -
Definition list
- 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 together
Example #1
<!DOCTYPE html> <html> <body> <dl> <dt><b>Web Designing company in Chennai<b></dt> <dd>This service Enhance Website Exposure with professional User Interface </dd> </dl> </body> </html>
Copy after loginOutput:
Example #2
<html> <head> <title>Page Title</title> <style> body { background-color: pink; text-align: center; color: blue; font-family: Arial, italic; } </style> </head> <body> <h1>HTML Demo 2</h1> <p>This is Networking Protocol Abbreviation.</p> <dl> <dt>FTP <dd>File Transfer Protocol <dt>TCP/IP <dd>Transmission Control Protocol/IP address <dt>SNMP <dd>Simple Network Management Protocol </dl> </body> </html>
Copy after loginOutput:
Type 2: Single description along with multiple terms
Example# 1
<!DOCTYPE html> <html> <body> <dl> <dt> Ebay</dt> <dt>Etsy</dt> <dt>Walmart</dt> <dd>The Top 10 internet shopping websites in the year 2019</dd> </dl> </body> </html>
Copy after loginOutput:
Next, we shall use the ‘lang’ attribute in the
- where the terms use different languages. These attributes put out ISO language code as its two-letter value.
Example# 2
<!DOCTYPE html> <html> <body> <h2>A Description HTML list</h2> <dl lang="es"> <dt>formas</dt> <dt lang="en-us">Shapes</dt> <dt lang="fr">Formes</dt> <dd>A Shape determines the different structure of the objects. </dd> </dl> </body> </html>
Copy after loginOutput:
Type 3: Single term describing multiple descriptions
Example
<html> <head> <title>DEFINITION LIST</title> </head> <body bgcolor=" brown" text="pink"> <h1><u>DEFINITION LIST DEMO</u></h1> <h3> <dl> <dt lang="es"><u>Compact:</u></dt> <dd>A Compact may refer to make-up case. </dd> <dd>When taken as adjective it refers to smaller part. Example, need a compact sofa to sit.</dd> </dl> <h3> </body> </html>
Copy after loginOutput:
Type 4: Multiple Terms and Multiple Descriptions
Example
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.1"> <title>Definition List example</title> </head> <body> <h1>Definition List Demo4</h1> <dl> <dt> Engaged</dt> <dt>Leaves</dt> <dd>Students got engaged during their Lab hours in the college.</dd> <dd>Childrens feels when their father leaves for the work.</dd> </dl> </body> </html>
Copy after loginOutput:
Type 5: Definition List using Style Attribute
Here style attribute is indicated for the colors to highlight the description terms.
Example #1
<html> <head> HTML Definition Lists </head> <body> <h2> list of Popular International Entrance Examination <h2> <dl> <dt style="color:Blue"> TOEFL </dt> <dd> -: Test of English As Foreign Language . This Score is Accepted in the country like Canada,UK,USA</dd> <br> <dt style="color:Magenta"> GRE </dt> <dd> -: The Graduate Record Examination. This Test is allowed to enter in the States like Canada and US foran indian Students in the Science and Technology Fields </dd> </dl> </body> </html>
Copy after loginOutput:
Using the tag, it is understood that the nearby text is assigned to be the definition of the term.
Example #2
<!DOCTYPE html> <html> <head> <title> Demo</title> <dl> <dt lang="en-GB"><dfn> Definition list</dfn></dt> <dt><dfn><b>Apple fruit </b></dfn></dt> <dd>This fruit is quoted as "miracle food" where this gives best nutrients to the body. They are rich in antioxidents</dd> <dd>A small fragment of apple intakes daily cures cancer,heart disease etc.</dd> <dd> Different varieties includes Braeburn,Cameo,Fuji,Gala </dd> </dl> </html>
Copy after loginOutput:
Type 6: Placing Background color for the Description List
Below Examples Shows the Content with background color By using the attribute ‘bgcolor’.
Example
<html> <head> <title>DEFINITION LIST</title> </head> <body bgcolor="Green" text="pink"> <h1><u>DEFINITION LIST DEMO</u></h1> <h3> <dl> <dt lang="en-GB"><u>PYTHON:</u></dt> <dd>Python is a progranning Language originally developed by Guido van. Its an Open Source and Cross-Platform. Applications include Web development, Data Machine Learning </dd> </dl> <h3> </body> </html> </dl> </html>
Copy after loginOutput:
Conclusion – HTML Description List
We 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.
The above is the detailed content of HTML Description List. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
