Skip to content
AITroveRead. Build. Understand.
Make this comfortable

HTML ins and del: show an edit without falsifying current text

Last updated: 1 Oct 20267 min read
tutorial
IntermediateBy AITrove Editorial

The ins and del elements identify inserted and removed content in a document revision.

Use it in a concrete workflow

A service policy changes its inspection threshold. Keeping the old and new phrases in the change view lets a reviewer understand the edit. The datetime attributes record when the change was made; a visible sentence still explains what the current policy is for readers who do not inspect element semantics. Once the change is accepted into the main policy, a clean current version may be easier to read than permanent inline revision marks.

html
<p>Inspection threshold changed on 1 October 2026:
  <del datetime="2026-10-01">45 minutes</del>
  <ins datetime="2026-10-01">47 minutes</ins>.
</p>
<p>The current threshold is 47 minutes.</p>

Behavior and ownership

The markup records a textual change, not an audit trail. The server must retain who approved the revision, what version it replaced, and any legal or operational evidence required by the product.

Performance and maintenance

Two extra elements cost almost nothing. Large documents with every historical edit inline become hard to scan, so separate a concise current policy from a dedicated change log when revisions accumulate.

Common Mistakes

  • Do not use del merely to make text look crossed out.
  • Do not confuse a timestamp with approval evidence.
  • Do not leave the current rule ambiguous between old and new values.

Connected lessons

html
semantics
Storage details