HTML <dl> tagS2C Home   « HTML <dl> tag

Definition

The <dl> tag and its' closing </dl> tag are used to define 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.


<dl class="classname"></dl>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<dl id="idname"></dl>

style - specifies an inline style for the element allowing you to apply the style to the content.


<dl style="color:red;text-align:left"></dl>

title - specifies extra information about the content.


<dl title="information about the content"></dl>

Language Attributes

dir - specifies the directional flow of the content.


<dl dir="ltr"></dl>   <!-- The text will flow from left to right -->

<dl dir="rtl"></dl>   <!-- The text will flow from right to left -->

lang - specifies a language code for the content of the element.


<dl lang="en"></dl>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<dl xml:lang="fr"></dl>

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.


<dl onkeydown="go()"></dl>   <!-- Exectutes the go() function -->

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<dl onkeypress="go()"></dl>   <!-- Exectutes the go() function -->

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<dl onkeyup="go()"></dl>   <!-- Exectutes the go() function -->

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<dl onclick="go()"></dl>   <!-- Exectutes the go() function --> 

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<dl ondblclick="go()"></dl>   <!-- Exectutes the go() function -->

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<dl onmousedown="go()"></dl>   <!-- Exectutes the go() function -->

onmousemove - The JavaScript code to be run when the mouse button is moved.


<dl onmousemove="go()"></dl>   <!-- Exectutes the go() function -->

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<dl onmouseout="go()"></dl>   <!-- Exectutes the go() function -->

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<dl onmouseover="go()"></dl>   <!-- Exectutes the go() function -->

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<dl onmouseup="go()"></dl>   <!-- Exectutes the go() function -->

go to home page Homepage go to top of page Top