HTML5 Reference

HTML <del> tag

Definition

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

Example


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

Today is MondayTuesday.

Attributes

The following attributes can be used with the <del> tag.


<del> Specific Attributes
Attribute Value Description Example
citeurlSpecifies the URL of a document containing information regarding the deletion.

<del cite="../../pages/deletions.html">
datetimeA valid date string with optional timeSpecifies the date and time (optional) of the editorial deletion.

<del datetime="2020-02-02">
<del> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<del class="name">Deletion Text</del>
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<del id="name">Deletion Text</del>
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<del style="color:red;">Deletion Text</del>
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<del title="Content info">Deletion Text</del>
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<del accesskey="a">Deletion Text</del>
tabindexSpecifies a tab order for the element.

<del tabindex="1">Deletion Text</del>
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<del dir="ltr">Deletion Text</del>
<!-- The text will flow from right to left -->
<del dir="rtl">Deletion Text</del>
langSpecifies a language code for the content of the element.

<del lang="en">Deletion Text</del>
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited / browser specific. -->
<del spellcheck="true">Deletion Text</del> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<del translate="no">Deletion Text</del> 
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<del contenteditable="true">Deletion Text</del> 
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<del draggable="true">Deletion Text</del>
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<del hidden>Deletion Text</del> 
<del hidden="hidden">Deletion Text</del> 
<del> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<del oncopy="go()">Deletion Text</del> 
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<del oncut="go()">Deletion Text</del>
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<del onpaste="go()">Deletion Text</del>
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<del ondrag="go()">Deletion Text</del>
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<del ondragend="go()">Deletion Text</del>
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<del ondragenter="go()">Deletion Text</del>
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<del ondragleave="go()">Deletion Text</del>
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<del ondragover="go()">Deletion Text</del>
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<del ondragstart="go()">Deletion Text</del>
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<del ondrop="go()">Deletion Text</del>
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<del onblur="go()">Deletion Text</del>
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<del onchange="go()">Deletion Text</del>
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<del oncontextmenu="go()">Deletion Text</del>
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<del onfocus="go()">Deletion Text</del>
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<del oninput="go()">Deletion Text</del>
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<del oninvalid="go()">Deletion Text</del>
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<del onreset="go()">Deletion Text</del>
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<del onselect="go()">Deletion Text</del>
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<del onsubmit="go()">Deletion Text</del>
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<del onkeydown="go()">Deletion Text</del>
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<del onkeypress="go()">Deletion Text</del>
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<del onkeyup="go()">Deletion Text</del>
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<del onabort="go()">Deletion Text</del>
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<del oncanplay="go()">Deletion Text</del>
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<del oncanplaythrough="go()">Deletion Text</del>
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<del oncuechange="go()">Deletion Text</del>
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<del ondurationchange="go()">Deletion Text</del>
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<del onemptied="go()">Deletion Text</del>
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<del onended="go()">Deletion Text</del>
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<del onloadeddata="go()">Deletion Text</del>
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<del onloadedmetadata="go()">Deletion Text</del>
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<del onloadstart="go()">Deletion Text</del>
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<del onpause="go()">Deletion Text</del>
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<del onplay="go()">Deletion Text</del>
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<del onplaying="go()">Deletion Text</del>
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<del onprogress="go()">Deletion Text</del>
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<del onratechange="go()">Deletion Text</del>
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<del onseeked="go()">Deletion Text</del>
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<del onseeking="go()">Deletion Text</del>
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<del onstalled="go()">Deletion Text</del>
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<del onsuspend="go()">Deletion Text</del>
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<del ontimeupdate="go()">Deletion Text</del>
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<del onvolumechange="go()">Deletion Text</del>
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<del onwaiting="go()">Deletion Text</del>
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<del onclick="go()">Deletion Text</del>
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<del ondblclick="go()">Deletion Text</del>
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<del onmousedown="go()">Deletion Text</del>
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<del onmousemove="go()">Deletion Text</del>
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<del onmouseout="go()">Deletion Text</del>
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<del onmouseover="go()">Deletion Text</del>
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<del onmouseup="go()">Deletion Text</del>
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<del onwheel="go()">Deletion Text</del>
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<del onscroll="go()">Deletion Text</del> 
Window - NONE