HTML Tutorial

HTML Tag: <del>

The HTML <del> tag represents deleted text, indicating that the content is no longer accurate or relevant. It visually strikes through the text using a horizontal line.

Usage of <del>

Use the <del> tag to:

  • Indicate removed content: Cross out deleted text to show that it has been removed from the document.
  • Highlight historical information: Strike through outdated or superseded information to indicate its archival nature.
  • Emphasize importance: Visually emphasize removed text to draw attention to the fact that it has been deleted.

Attributes of <del>

The <del> tag supports several attributes:

  • cite: Specifies the source or reason for the deletion.

Examples with <del>

<p>The original text was "This is the old content."</p>

<p>The deleted text is: <del>This is the old content.</del></p>

Output:

The original text was "This is the old content."

The deleted text is: This is the old content.

Exploring the <del> Tag

HTML Example:

<!DOCTYPE html>
<html>
<body>

<h1>The Deleted Text</h1>

<p>The following text has been deleted: <del>This is the old text.</del></p>

</body>
</html>

Output:

The Deleted Text

The following text has been deleted: This is the old text.