
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add Description List of an Element Using HTML
HTML, which stands for HyperText Markup Language, is a combination of Hypertext and Markup language which we can use to structure a web page and its content. In this article we are going to take a look at how we can add a description list of an element using HTML.
<dl> tag
The <dl> tag is used to represent the description list. This tag is used alongside the tags <dt> and <dd>.
Syntax
<dl>Description List Content</dl>
Approach
We are going to make use of the <dl> tag alongside the <dt> and <dd> tags to add description list of an element.
Example
Step 1 ? First we will define the basic HTML code.
<!DOCTYPE html> <html> <head> <title>How to add description list of an element using HTML?</title> </head> <body> <h4>How to add description list of an element using HTML?</h4> </body> </html>
Step 2 ? Now we will add the description list.
<dl> <dt>Javascript</dt> <dd>It is a scripting language which is used to perform client side scripting operations</dd> <dl>
Here is the complete code ?
<!DOCTYPE html> <html> <head> <title>How to add description list of an element using HTML?</title> </head> <body> <h4>How to add description list of an element using HTML?</h4> <dl> <dt>Javascript</dt> <dd>It is a scripting language which is used to perform client side scripting operations</dd> <dl> </body> </html>
Conclusion
In this article, we had a brief look at the tags <dl>, <dt> and <dd>. We also understood how we can use these tags to add a description list to an element in HTML.