References

Beginner-friendly references for web development, with live, editable examples.

The HTML <del> tag

Element All modern browsers Updated
Quick answer

The HTML <del> element marks text that has been deleted from a document (an edit/revision), usually rendered struck through. Record the source with cite and the time with datetime; it pairs with <ins> for insertions.

Overview

The <del> element represents content that has been removed in a revision of the document — useful for showing edits, changelogs, tracked changes, and "before and after" diffs. Browsers render it with a strikethrough.

Document the change with two attributes: datetime records when the deletion was made (in ISO-8601), and cite holds a URL explaining why. Its natural partner is <ins>, which marks the corresponding inserted content.

The line to watch is against <s>: use <del> when content was actively deleted in an edit, and <s> when content is merely no longer accurate or relevant. Because a strikethrough is purely visual, add an accessible cue where the deletion carries important meaning.

Syntax

<p>Price: <del>£20</del> <ins>£15</ins></p>

Attributes

The <del> element supports the following attributes, in addition to the global attributes available to every HTML element.

Attribute Value Description
cite A URL. Cites the source URL of a quote or edit.
datetime A valid date/time string, e.g. 2026-06-22, 14:30 or 2026-06-22T14:30. Gives a machine-readable date/time.

Example

Live example
<p>Meeting at <del datetime="2026-06-20">3pm</del> <ins>4pm</ins>.</p>

Best practices

  • Use <del> for content removed in a document edit or revision.
  • Pair it with <ins> for the corresponding additions.
  • Document the edit with the datetime and cite attributes.
  • For content that is simply no longer relevant rather than deleted, use <s>.

Frequently asked questions

What is the del element for?
To mark content that has been deleted from the document in a revision, such as in a changelog or tracked changes.
What is the difference between del and s?
<del> marks an actual deletion in an edit; <s> marks content that is no longer accurate or relevant.
How do I record when and why something was deleted?
Use the datetime attribute for when and the cite attribute (a URL) for why.
What element marks inserted content?
<ins>, the counterpart to <del>.