Purpose and content model
Ins records an addition to a document and del records a removal. They can mark changes at a word, sentence, or larger flow-content level, subject to their surrounding content model. A visible revision can explain what changed, but these elements are not a complete version-control system or an audit log.
Sub and sup express typographic conventions whose meaning depends on subscripting or superscripting, such as chemical formulas, mathematical powers, and some ordinal conventions. Use CSS positioning when text is merely decorative. Markup should preserve the underlying meaning rather than only imitate a printed appearance.
Syntax and working example
<p>Meet at <del datetime="2026-10-20">09:00</del> <ins datetime="2026-10-21">10:00</ins>.</p>
Supported attributes and behavior
Ins and del support cite for an explanation URL and datetime for the change time. The cite attribute does not create a visible link, so include one when readers need it. Sub and sup have no special attributes beyond globals. Avoid crossing paragraph boundaries with edit markers in a way that leaves the beginning or ending of a paragraph ambiguous.
Another practical pattern
<p>Water is H<sub>2</sub>O.</p>
<p>The area of a square is <var>s</var><sup>2</sup>.</p>
<p><del cite="/changes/42/">Old delivery estimate</del> <ins>Delivery within three days</ins></p>
Accessibility and browser notes
Many screen-reader configurations do not announce insertions, deletions, or superscripts in the exact way an editor expects. Provide a visible summary for consequential changes. Complex mathematics is better represented with MathML than a long chain of visually arranged spans and sub/sup elements.
Common mistakes
Do not use del solely to cross out a price if the meaning is simply that an old offer is no longer current; s may be a better fit. Do not treat datetime as proof of when a change actually occurred. A client can edit the document and its metadata.
Verify your implementation
Read a changed sentence without visual strike-through and ensure the current instruction is clear. Validate the change timestamp and source explanation. For formulas, test speech output and copy-paste to ensure the notation remains understandable outside the visual layout.
Standard status and sources
Standard; browser availability must be checked independently of specification status.