Description:
The HTML dt tag is used to define the start of a term in a definition list.
A definition list is similar to other lists but in a definition list, each list item contains two entries: a term and a description.
The <dt> tag defines a term/name in a description list.
The <dt> tag is used in conjunction with <dl> (defines a description list) and <dd> (describes each term/name).
Difference between HTML and XHTML:
NONE
Differences Between HTML 4.01 and HTML5:
In HTML 4.01, the <dt> tag defines an item in a definition list.
In HTML5, the <dt> tag defines a term/name in a description list.
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 dt tag appeared first on .