HTML <del> Element
The <del> element represents text or other content that has been removed from a document. Browsers commonly display deleted text with a line through it, making revisions or changes easier to recognize.
Syntax
<p>The original price was <del>$49.99</del> $39.99.</p>
The <del> element uses both an opening and closing tag and can wrap the text or content that has been removed or replaced.
Attributes
The <del> element supports the global HTML attributes and the following element-specific attributes:
| Attribute | Description |
|---|---|
cite |
Provides a URL that points to a source or document explaining why the content was deleted or changed. |
datetime |
Specifies the date and optionally the time when the deletion or change occurred. |
Example
The following example shows a price that has been replaced with a new value:
Usage Notes
Use the <del> element when content has actually been removed or replaced and you want that change to remain visible in the document.
The cite attribute can reference a page or document that explains the reason for the deletion, while the datetime attribute can record when the change occurred.
Browsers usually render deleted text with a line through it, but this appearance comes from default browser styling and can be changed with CSS.
Do not use <del> only to create strikethrough styling. When text is no longer accurate or relevant but is not part of an edit or revision, the <s> element may be more appropriate.
Accessibility
The visual strikethrough commonly used for <del> may not always be announced clearly by every screen reader, so important revisions should also be understandable from the surrounding text.
When the deletion is important to the meaning of the content, provide enough context so users can understand what changed without relying only on the visual line through the text.
Browser Support
Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.
For detailed browser compatibility information, see Can I Use: HTML <del> Element .
Related Elements
<ins> - Represents content that has been added to a document.
<s> - Represents content that is no longer accurate or relevant.
