<del>

The <del> element in HTML is used to indicate deleted or removed text in a document. Browsers typically render it with a strikethrough to show that the content was removed.

del tag

The <del> element signifies text that has been removed, making it useful for tracking changes or highlighting differences. In contrast, the <ins> element denotes text that has been added.

Syntax

index.html
<del>Text that has been deleted</del>

del Demo

Our original plan was to meet at the park have dinner at a restaurant.

index.html
<p>
  Our original plan was to <del>meet at the park</del> have dinner at a restaurant.
</p>

Definition and Usage

The <del> tag marks text that has been removed from a document. Browsers typically display deleted text with a strikethrough.

The <del> tag encloses the text "meet at the park," indicating that it has been deleted or is no longer relevant.

Attributes

This element includes the global attributes.

  • cite: A URI linking to a resource that provides context for the change (e.g., meeting minutes).
  • datetime: Specifies the date and time of the change using a valid date string with optional time. If the string is unparseable, the element will not have a timestamp.

Conclusion

The <del> element in HTML is used to mark text that has been removed from a document, typically displayed with a strikethrough. It is valuable for tracking changes, revisions, or highlighting differences in content. The element can also include the cite attribute to provide context and the datetime attribute to specify when the change occurred. When used alongside the <ins> element, which indicates added text, it provides a clear way to show updates in documents.