HTML <del> Tag

Definition and Usage

<del> The definition of the marked text that has been deleted from the document. Browsers usually underline the deleted text.

Tip:See also for marking inserted text: <ins> Tag.

See also:

HTML DOM Reference Manual:Del Object

Instance

Example 1

Text with deleted and inserted parts:

<p>The color I like is <del>blue</del><ins>red</ins>!</p>

Try It Yourself

Example 2

Use CSS to set the styles of <del> and <ins>:

<html>
<head>
<style>
del {background-color: tomato;}
ins {background-color: yellow;}
</style>
</head>
<body>
<p>The color I like is <del>blue</del><ins>red</ins>!</p>
</body>
</html>

Try It Yourself

Attribute

Attribute Value Description
cite URL Specifies the URL of the document, explaining the reason for the deletion/changing of the text.
datetime YYYY-MM-DDThh:mm:ssTZD Specifies the date and time of the deletion/changing of text.

Global Attributes

<del> The tag also supports Global Attributes in HTML.

event attributes

<del> The tag also supports Event Attributes in HTML.

Default CSS Settings

Most browsers will display the following default values <del> Element:

del {
  text-decoration: line-through;
}

Try It Yourself

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support