HTML dt tag


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>
<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>

Definition List
A list of terms and their definitions/descriptions.
HTML
An HTML tutorial.
PHP
An PHP tutorial.

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
Designed for Mytoptutorials.com