HTML Del Tag

The <del> tag is used to show that some content has been deleted or removed from a web page. Think of it like putting a strike-through line on text — it visually tells the reader, "Hey, this was here before, but now it’s no longer valid or has been changed."

The main goal of the <del> tag is to track or communicate changes in content clearly. It’s very useful when:

  • You’re showing the difference between old and new versions of something.
  • You want users to see the original content that has been replaced.
  • You’re making corrections or edits but want to be transparent.
Syntax -
<del>text you want to strike through</del>
AttributeDescriptionValues
citeSpecifies the description link which can describe about the deletion.URL.
datetimeSpecifies the deletion date and time.This is optional.YYYY-MM-DDThh:mm:ssTZD
Example -

Scenario1 - Basic Use of <del>

<!DOCTYPE html>
<html>
	<head>
		<title>DEL Tag example.. </title>
	</head>
	<body>
		<p>The old price of the course was <del>$199</del>. 
			Now it's only <strong>$99</strong>!</p>
	</body>
</html>

Output -

The old price of the course was $199. Now it's only $99!

The old price $199 is shown with a strikethrough. The new price $99 is emphasized using <strong>.

Scenario2 - Using the datetime Attribute

<p><del datetime="2023-12-01T09:00:00Z">This feature will be 
	available from December 1, 2023.</del></p>

Output -

This feature will be available from December 1, 2023.

Here, we’re not only showing that the text is outdated but also stamping the date and time when it was considered deleted. This is useful in audit logs or changelogs.