HTML dl tag

HTML dl element defines description list. It consists of one or more name-value pairs. This list is used to define various terms. For example, string, operators and string length are the terms that are defined in description list.


Definitions of various terms

It is the group of characters in the double qoutaion marks.
The operators perform operations on operands and do calculations.
String length
String length means the no. of characters in a string
Try </>

In the above example, the description list contains more than one name-value pairs.

Specific uses

Its common uses are given below.

  • terms and their definitions (name-value)

  • questions and answers (name-value)

Related tags

<dt> Here, description term (name) is the name of the term to be defined.
<p>The paragraph line breaks at <br> element.</p>
<dd> Here, description definition(value) is the definition of the term being defined.
<p>The paragraph line breaks at <br> element.</p>

Tag omission

Both opening and closing tags are necessary for the dl element.

Global Attributes

All the global attributes are applicable on the dl element.

Was this article helpful?




Get the newsletter