HTML <del> tagS2C Home   « HTML <del> tag

Definition

The <del> tag is used to define editorial deletions in text.

Example


  Today is <del>Monday</del>Tuesday.

Required Attributes

NONE

Optional Attributes

cite specifies the a URL containing information regarding the deletion.


  Today is <del cite="http://server2client.com/pages/deletions.html">Monday</del>Tuesday.

datetime specifies the data and time of the editorial deletion.


  Today is <del datetime="value">Monday</del>Tuesday.

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<del class="classname">Strikethrough text here</del>

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


<del id="idname">Strikethrough text here</del>

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


<del style="color:red;text-align:left">Strikethrough text here</del>

title - specifies extra information about the content.


<del title="information about the content">Strikethrough text here</del>

Language Attributes

dir - specifies the directional flow of the content.


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

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

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


<del lang="en">Strikethrough text here</del>

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


<del xml:lang="fr">Strikethrough text here</del>

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 -->
<del onkeydown="go()">Strikethrough text here</del>

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 -->
<del onkeypress="go()">Strikethrough text here</del>

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


<!-- Executes the go() function -->
<del onkeyup="go()">Strikethrough text here</del>

Mouse Event Attributes

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


<!-- Executes the go() function -->
<del onclick="go()">Strikethrough text here</del>

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


<!-- Executes the go() function -->
<del ondblclick="go()">Strikethrough text here</del>

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 -->
<del onmousedown="go()">Strikethrough text here</del>

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


<!-- Executes the go() function -->
<del onmousemove="go()">Strikethrough text here</del>

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


<!-- Executes the go() function -->
<del onmouseout="go()">Strikethrough text here</del>

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


<!-- Executes the go() function -->
<del onmouseover="go()">Strikethrough text here</del>

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


<!-- Executes the go() function -->
<del onmouseup="go()">Strikethrough text here</del>

go to home page Homepage go to top of page Top