Explain Description Lists in HTML
An HTML description list is a list of terms, with a description of each term. The HTML description list is represented as <dl>. 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:
- To give definitions to particular terms that we have defined in our lists.
- To have a dictionary type of format(term and definition of term)
Format of description Lists:
- Description Lists are used with description list tag <dl> tag in HTML.
- In <dl> tag we have description terms it is represented as <dt> tag Here we do not use li tag as Other Lists. In <dt> write the terms of the data. We can have different terms with the help of <dl>tag.
- In this we use the data description tag <dd> we use this tag for defining the term that we have stated. for eg. If we declare the term as Pizza then we can have a description as Pizza is a food item.
<dl> Contents of the list </dl>
Example 1: In this example, we will use <dl> tag.
Example 2: In this example, we will use <dl> with <dt>, <dd> tags.
My Personal Notes arrow_drop_up
Please Login to comment...