The <del> element marks text that has been deleted from a document — useful for “track changes,” diffs, or showing an old price next to a new one.
Browsers often draw a line through the text. Pair it with <ins> for additions. Optional cite and datetime record why and when the change happened.
Baseline · Widely available.
Not deprecated. Stable across browsers since about July 2015 (and much earlier in practice).
Obsolete: <strike>.
Do not use <strike>. For editorial deletions use <del>; for outdated-but-not-edited content see <s>.
Still visible.
<del> does not hide text from the page or from View Source. Never use it to “hide” secrets.
Syntax
HTML Syntax
syntax.html
<del>deleted text</del>
Both start and end tags are required. Content is transparent (it can wrap phrasing or, in valid contexts, larger blocks such as a paragraph). The implicit ARIA role is deletion.
cite / datetime are mainly for machines and authors — browsers rarely show them as UI.
How It Works
Set datetime to a valid date (or date-time) string.
Set cite to a URL that explains the edit.
Keep human text clear inside <del> / <ins>.
Do not expect a tooltip by default — these attributes are metadata.
Example 4 — <del> vs <s>
Use <del> for edits; use <s> when content is outdated but not documenting a deletion.
HTML
<!-- Editorial deletion / revision -->
<p>Was <del>$29</del> <ins>$19</ins>.</p>
<!-- No longer accurate (not an edit trail) -->
<p>Today’s special: <s>Sold out yesterday</s> back in stock.</p>
One line:<del> documents a deletion — usually with a strikethrough, still visible in the HTML.
UA style
Default CSS Settings
Typical user-agent styling draws a line through deleted text:
default.css
del {
text-decoration: line-through;
}
You may add background colors for clearer diffs, but keep contrast accessible and do not remove the semantic meaning of the tag.
Frequently Asked Questions
The del element marks a range of text that has been deleted from a document — for example track-changes or a source diff. Browsers often show it with a line through the text.
Use del when you document an edit (text removed from the document). Use s for content that is no longer accurate or relevant but is not an editorial deletion. Prefer del + ins for revisions.
del marks removed text; ins marks added text. Together they show a revision: old wording struck out and new wording inserted.
cite is a URL that explains the change. datetime is a machine-readable date or date-time of when the deletion happened.
No. The strike element is obsolete. Use del for deletions or s when you need presentational strikethrough for outdated content — not strike.
No. The text stays in the document and is usually visible with a strikethrough. To hide content completely, remove it or use CSS/script — do not rely on del for privacy.