Description

The HTML element <del> is used to specify a text that has been deleted from an HTML document, which is rendered as strike-through text on browsers.

The below table summarizes its usage.

Usage Details
Placement It is displayed as a Block or Inline element, based on its content markup.
Contents It can contain Block elements, Inline elements, and text.
Tags Both opening and closing tags are required.
Versions HTML 4, 4.01, 5

NOTE: There is a counterpart for <del> which is <ins> used for inserted text.

Syntax

Here is the basic syntax of the <del> element.

<del>...</del>

Examples

In the below example, the <del> element is used to markup the deleted text and used the element <ins> to define an inserted text in place of deleted text.

<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
    <h1>HTML Description List</h1>
    <p>My favorite sport is <del>Football</del><ins>Cricket</ins>.
</body>
</html>

Attributes

The following table shows the list of supported and unsupported attributes for the <del> tag.

Attribute Type Details
Element-Specific Attributes The tag <del> has some element-specific attributes listed in the below table.
Global Attributes Like all other HTML tags, the tag <del> supports the HTML Global Attributes.
Event Attributes The tag <del> also supports the HTML Event Attributes.

Here is a list of attributes that are specific to the <del> element.

Attribute Value Description
cite URL Specifies the URL of the document or message that explains the reason for deletion.
datetime YYYY-MM-DDThh:mm:ssTZD Specifies the date and time when the delete was made.

Browser Compatibility

The tag <del> is supported in all modern browsers.

  • Google Chrome 1+
  • Internet Explorer or Edge 4+
  • Firefox 1+
  • Apple Safari 1+
  • Opera 7+

Related Links