LAST UPDATED: JUNE 2, 2020
HTML dl Tag
In HTML <dl> tag, the term <dl> means a Description List. The <dl> tag is used along with <dt> tag and the <dd> tag.
The <dl> tag is used to create a list with different terms and definitions. The terms in a description list are enclosed within the the <dt> tag and the description of the term is specified using the <dd> tag.
So the <dl> tag is basically a container tag, which has content enclosed in the <dt> and <dd> tags.
Also, this is a block-level element.
HTML <dl> Tag - Syntax and Usage
The <dl> tag requires the start(opening) tag and end(closing) tag.
Following is the syntax for using the <dl> tag in your HTML code:
<dl>
<dt>some term</dt>
<dd>its definition...</dd>
</dl>
HTML <dl> Tag Basic Example
Below we have a basic example showing how we use the HTML <dl> tag
HTML <dl> Tag Attributes
This element does not have any specific attributes although this element supports Global attributes and Event attributes.
Default CSS style for HTML <dl> Tag
Most of the Browsers use these default CSS Settings:
dl {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
}
Browser Support for HTML <dl> tag
Following browsers support this attribute:
-
Firefox 1+
-
Google Chrome 1+
-
Internet Explorer 2+
-
Safari 1+
-
Opera 2.1+