HTML BasicsLesson 36 of 36

The del and ins Tags

The del tag shows text that was removed, rendered with a line through it. The ins tag shows text that was added, underlined by default. Together they tell the story of a change: what was there before, and what replaced it.

The del tag shows text that was removed, rendered with a line through it. The ins tag shows text that was added, underlined by default. Together they tell the story of a change: what was there before, and what replaced it.

That matters for any page that gets corrected. Price changes, updated articles, changelogs, and legal text all benefit from showing the old and the new side by side. A reader sees the history at a glance instead of wondering what changed.

Both tags can carry a cite attribute with a URL explaining the change and a datetime attribute with when it happened. Why they exist: silently replacing text on a published page is misleading, and these tags make edits honest. They work in every browser.

The attributes

The cite attribute holds a URL explaining the change, and datetime holds when it happened. Neither is required, but both add context. Editors and revision tools can use them to build a history of the page without keeping separate records.

HTML
<del datetime="2026-03-04">Old price: $99</del>
<ins datetime="2026-03-04">New price: $79</ins>

Beyond single words

Del and ins can wrap blocks like paragraphs and list items, not just single words. Inline deletion inside a sentence is the most common pattern, but whole sections can be marked. Keep the new text next to the deleted text so the change reads in one glance.

Syntax

HTML
<p>Price: <del>$99</del> <ins>$79</ins></p>

<del> and <ins> Are Silent - Screen Readers Hear No 'Deleted'

Sighted users see ~~strike~~ and <ins>underline</ins> as edit history, but VoiceOver/Narrator announce no 'deleted'/'inserted' by default - the edit is invisible to blind users and fails WCAG 1.3.1. TPGi and manuelsanchezdev 2025 tests show only NVDA announces 'deletion'. Fix: add visually-hidden 'deletion start/end' via CSS ::before/::after or provide a change-summary. Also always add cite and datetime="2026-08-27T14:00Z" for machine provenance.

HTML
<del cite="pr.html" datetime="2026-08-27T14:00Z">old price $50</del> <ins>$39</ins>
/* + CSS :where(del)::before{content:'deletion start 'clip... } */

Good to know

  • Del = removed, ins = added.
  • Default looks are strikethrough and underline.
  • Cite and datetime add change context.
  • Use them in changelogs and corrected articles.
Try it Yourself Edit the code, press Run, then check what changed in the Result.
Ready
Code
Result

Practice makes it stick

Open the Playground and build your own page with the tags you just learned.

→ Open Playground