HTML Tag Reference - HTML tag <dl>








This element is the definition list, and it is used in conjunction with the <dt> and <dd> elements. You can use the <dl> element to contain multiple definition terms(<dt>) along with definition descriptions(<dd>).

Browser compatibility

<dl> Yes Yes Yes Yes Yes

Global Attributes

The <dl> tag supports the Global Attributes in HTML.

Event Attributes

The <dl> tag supports the Event Attributes in HTML.





Default CSS Settings

dl {
    display: block;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
}

Example

A demo showing how to use <dl> tag.

<html>
<body>
     <dl>
          <dt>&lt;TABLE&gt;</dt>
          <dd>an html element.</dd>
          <dt>border-color</dt>
          <dd>a style sheet property.</dd>
          <dt>innerText</dt>
          <dd>a JavaScript property.</dd>
          <dt>cloneNode()</dt>
          <dd>a JavaScript method.</dd>
     </dl><!--from  ww w . j av  a  2  s .  co  m-->
</body>
</html>

Click to view the demo