Description:
The HTML dl tag inserts a definitions list, composed by two elements: terms (HTML dt element) and descriptions (HTML dd element). In definition lists, terms can be associated to one or more descriptions and viceversa. The way terms and descriptions are associated is arbitrary and left to the author's consideration.
Differences Between HTML 4.01 and HTML5:
In HTML 4.01, the <dl> tag defines a definition list.
In HTML 5, the <dl> tag defines a description list.
Difference between HTML and XHTML:
NONE
Example:
Code | View |
---|---|
<dl> <dt>Definition List</dt> <dd>A list of terms and their definitions/descriptions.</dd> <dt>HTML</dt> <dd>An HTML tutorial.</dd> <dt>PHP</dt> <dd>An PHP tutorial.</dd> </dl> |
|
Second Example:
Code | View |
---|---|
<dl> |
|
Standard Attributes:
Attribute | Description |
---|---|
class | Document wide identifier |
dir | Specifies the direction of the text |
id | Document wide identifier |
title | Specifies a title to associate with the element. |
style | Helps to include inline casecadubf style sheet. |
lang | Sets the language code. |
Event Attributes:
Attribute | Description |
---|---|
onclick | Script runs when a mouse click |
ondblclick | Script runs when a mouse double-click |
onmousedown | Script runs when mouse button is pressed |
onmouseup | Script runs when mouse button is released |
onmouseover | Script runs when mouse pointer moves over an element |
onmousemove | Script runs when mouse pointer moves |
onmouseout | Script runs when mouse pointer moves out of an element |
onkeypress | Script runs when key is pressed and released |
onkeydown | Script runs when key is pressed |
onkeyup | Script runs when key is released |
The post HTML dl tag appeared first on .