HTML <del> Tag Tutorial - Usage, Syntax,
Attributes and Example

calender-iconPublished: 15 May 2025

clock-icon5-min read





INTRODUCTION

The <del> element is used to indicate that text has been deleted from the webpage. It is shown by browser with a strike-through line on the text. This tag makes possible to show difference/changes made in text or track changes in source code. The tag also helps screen readers and search engine understand that the content has been deleted.

The <del> element is generally used with <ins> element to show the text that is newly added.


Syntax:
<del>--text--</del>

Example:

<p> 
<del> This is deleted text. </del> 
I am new text. </p>

Output:

This is deleted text.
I am new text



Tag Omission

The HTML <del> element must have both start tag and end tag.

ATTRIBUTES

1. cite

cite attributes is used for URI of resource that explains the change. (Example: A link to webpage)

Example:
<p> <del cite="www.example.com/blog"> Outdated clause </del>
  new clause.
</p>


2. datetime

datetime attributes is used to specify date and time of change. It must be a valid date string while time is optional. The Date string format is - YYYY-MM-DD and date-time string format is YYYY-MM-DDTHH:MM:SSZ

Example:
<p> <del datetime="2023-07-05T15:17:03Z"> Old policy text here. </del>
  New policy text.
</p>

Frequently Asked Questions (FAQ)

What is the Difference Between HTML s Tag and HTML del tag?
The HTML del tag indicates that content has been removed from the document, regardless of whether it remains visible or is hidden using CSS. It represents an actual edit to the document. In contrast, the HTML s tag signifies that the content is no longer relevant or no longer accurate.

What is the purpose of the <del> tag in HTML?
The HTML del tag indicates that content has been removed from the document, regardless of whether it remains visible or is hidden using CSS. It represents an actual edit to the document.