HTML del Tag

HTML <del> Tag: The HTML<del> tag specifies the deleted content from a document. This HTML del tag supports both the global and the event attributes. Delete tag is markup updates and modifications in a document. The deleted text is rendered as strikethrough text by the web browsers although this property can be changed using CSS text-decoration property.

HTML <del> Tag

The HTML  del tag requires a starting and ending tag.

Syntax: <del> Text </del>



Attributes

The <del> tag contains two attributes which are listed below:

  • cite: It is used to specify the URL of the document or message which denotes the reason for deleting the text.
  • datetime: It is used to specify the date and time of the deleted text.

Browser compatibility

The HTML<del> tag is supported by chrome, firefox, opera, safari and internet explorer.

Example:

<!DOCTYPE html>
<html>
<body>
p>My favorite programming language is <del>C</del> <ins>Python</ins>!</p>
</body>
</html>

Output:

My favorite language is Python.

Attributes that are supported by the <del> tag

Attribute Value Description
cite URL Describes a URL to a document that explains the reason why the text was deleted
datetime YYYY-MM-DDthh:mm:ssTZD Describes the date and time of when the text was deleted