HTML strikethrough, del, ins
- Planted:
To represent edited text in HTML, there are a few semantically distinct options.
The <s>
strikethrough element is for text that’s “no longer relevant or no longer accurate” and is “not appropriate when indicating document edits.” E.g., Wool socks: $12 $8. The <del>
deleted text element is for “text that has been deleted from a document,” and the <ins>
inserted text element is for “text that has been inserted into a document.” There’s also a deprecated <strike>
element that was a catch-all for the visual strikethrough effect.
To accelerate these sorts of semantic HTML discoveries, I’ve been meaning to read Patrick Weaver’s Blog Post With Every HTML Element from a few months ago. There’s also the State of HTML 2023, which I'm hoping will be as much learning as it is survey-answering.
Reply
Respond with your thoughts, feedback, corrections, or anything else you’d like to share. Leave your email if you’d like a reply. Thanks for reading.