The HTML <ins> tag
The HTML <ins> element marks text that has been inserted into a document (an edit/revision), usually rendered underlined. Record details with cite and datetime; it is the counterpart to <del>.
Overview
The <ins> element represents content that has been added in a revision of the document — the counterpart to <del>. Browsers underline it by default to show it is newly inserted.
As with <del>, you can document the change using the datetime attribute (when the insertion was made) and the cite attribute (a URL explaining why). The two elements are usually used together to present an edit.
One thing to manage: because underlined text can be mistaken for a link, consider restyling <ins> with CSS — a different color or background often reads more clearly as "added" than an underline does. Add an accessible cue where the insertion carries important meaning.
Syntax
<p>Price: <del>£20</del> <ins>£15</ins></p>
Attributes
The <ins> element supports the following attributes, in addition to the global attributes available to every HTML element.
Example
<p>The total is <del>$50</del> <ins>$40</ins> after the discount.</p>
Best practices
- Use
<ins>for content added in a document revision. - Pair it with <del> to show the corresponding deletions.
- Document the change with the
datetimeandciteattributes. - Restyle the default underline with CSS so it is not mistaken for a link.
Frequently asked questions
What is the ins element for?
Why is ins underlined?
How do I document when content was inserted?
datetime attribute for the time and the cite attribute (a URL) for the reason.What element marks deleted content?
<ins>.