HTML Document Edits: ins, del and Change Metadata
Show changes to document content
Use del to mark removed content and ins to mark content added to a document. The browser typically renders deletion with a strike and insertion with an underline. Neither tag performs an edit or updates a database by itself.
<p> Meeting time: <del>9 AM</del> <ins>10 AM</ins></p>The old and new values remain visible as a marked revision.
Attach change metadata
Both elements accept optional datetime for the date or time of the change and cite for a source URL describing it. Use a valid machine-readable date. If the revision date matters to readers, show it in visible text too.
<p>Updated May 4, 2027:</p><p> Fee: <del datetime="2027-05-04">$12</del> <ins datetime="2027-05-04">$10</ins></p>The date appears visibly and is also recorded on both changes.
Distinguish edits from outdated facts
Use s for a statement that is no longer accurate when you are not documenting an edit. Keep edit markup within sensible paragraph boundaries. Important changes should also be explained in text because visual and assistive presentations vary.
<p> <s>Registration closed</s> Registration reopened.</p><p> Revised capacity: <del>20</del> <ins>30</ins> seats.</p>The first line corrects a status and the second explicitly records a revision.
Practice and next steps
Record a changed opening hour and explain the revision date in visible text. Then complete the linked quiz.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Insertions and deletions — Knowledge Check
Apply the concepts from Insertions and deletions.
Which element records inserted content?
Which attribute records the date of a change?
Which element is suitable for an outdated claim rather than a recorded edit?
A revision date must be visible to readers. What should you do besides setting datetime?
Does marking a price with del and ins change a server's stored price?