Ins and del can show what was added or removed when a document changes. They are meaningful edit markers, not merely ways to add underlines or strikethroughs.
What You Need to Know
Datetime attributes can record when an edit happened. They do not run a history system or create an audit trail by themselves.
The goal is not to collect as many tags as possible. Pick the element that best describes what the content really is.
Example: See It in Action
Try this markup in a fresh practice file. The next section explains the parts worth paying attention to.
This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.
<p>Our class met on <del datetime="2026-10-01">Thursday</del> <ins datetime="2026-10-02">Friday</ins>.</p>
<p>The change remains visible in the document.</p>
<p>Use del and ins for edited content.</p>
Let’s Understand the Example
- Ins marks content added to a document.
- Del marks content removed from a document.
- A p groups a paragraph of related text. Start another paragraph for a new thought.
- Datetime gives a date or time in a machine-readable form, separate from the friendly text shown to visitors.
Look for the text “Our class met on” in the page. If the visible result surprises you, inspect the rendered elements to see what the browser actually built.
What Should You See?
The page should include “Our class met on”. If it looks different from what you expected, open developer tools and compare the source with the elements the browser created.
Try removing one piece of markup in a scratch copy, refresh the page, and compare the behavior. This is often the fastest way to understand what that piece contributes.
Try It Yourself
- Mark one replaced word using both del and ins.
- Save your changes, open or refresh the page, and compare the result with the original example.
- Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.
Common Beginner Mistakes
- Using del to cross out an old price when the goal is only to show an outdated offer.
- Avoid picking tags just for their default bold, italic or spaced appearance. Use CSS for presentation.
Key Takeaways
- Ins and del can show what was added or removed when a document changes.
- Ins marks content added to a document.
- Datetime attributes can record when an edit happened. They do not run a history system or create an audit trail by themselves.