HTML <dt> tagS2C Home « HTML <dt> tag
Definition
The <dt> tag is used to define a definition term within a defintion list.
Example
<dl>
<dt>Boys Names</dt>
<dd>Pugh</dd>
<dd>Hugh</dd>
<dt>Girls Names</dt>
<dd>Charlotte</dd>
<dd>Emily</dd>
<dd>Jane</dd>
</dl>
Required Attributes
NONE
Optional Attributes
NONE
Common Attributes
class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.
<dt class="classname">Definition term</dt>
id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.
<dt id="idname">Definition term</dt>
style - specifies an inline style for the element allowing you to apply the style to the content.
<dt style="color:red;text-align:left">Definition term</dt>
title - specifies extra information about the content.
<dt title="information about the content">Definition term</dt>
Language Attributes
dir - specifies the directional flow of the content.
<!-- The text will flow from left to right -->
<dt dir="ltr">Definition term</dt>
<!-- The text will flow from right to left -->
<dt dir="rtl">Definition term</dt>
lang - specifies a language code for the content of the element.
<dt lang="en">Definition term</dt>
xml:lang - specifies a language code for the content of the element in XHTML documents.
<dt xml:lang="fr">Definition term</dt>
Document Event Attributes
NONE
Form Event Attributes
NONE
Image Event Attributes
NONE
Keyboard Event Attributes
onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.
<!-- Executes the go() function -->
<dt onkeydown="go()">Definition term</dt>
onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.
<!-- Executes the go() function -->
<dt onkeypress="go()">Definition term</dt>
onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.
<!-- Executes the go() function -->
<dt onkeyup="go()">Definition term</dt>
Mouse Event Attributes
onclick - The JavaScript code to be run when a mouse is clicked on the element.
<!-- Executes the go() function -->
<dt onclick="go()">Definition term</dt>
ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.
<!-- Executes the go() function -->
<dt ondblclick="go()">Definition term</dt>
onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.
<!-- Executes the go() function -->
<dt onmousedown="go()">Definition term</dt>
onmousemove - The JavaScript code to be run when the mouse button is moved.
<!-- Executes the go() function -->
<dt onmousemove="go()">Definition term</dt>
onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.
<!-- Executes the go() function -->
<dt onmouseout="go()">Definition term</dt>
onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.
<!-- Executes the go() function -->
<dt onmouseover="go()">Definition term</dt>
onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.
<!-- Executes the go() function -->
<dt onmouseup="go()">Definition term</dt>