HTML <ins> Element
The HTML <ins> element represents text or other content that has been inserted into a document. It is useful for showing revisions, additions, and changes where readers need to distinguish newly added content from the original version.
Syntax
<p>The office closes at <del>5:00 PM</del> <ins>6:00 PM</ins>.</p>
The <ins> element requires both an opening and closing tag. Content placed between the tags is identified as having been added to the document.
Attributes
The <ins> element supports the global HTML attributes and the following element-specific attributes:
| Attribute | Description |
|---|---|
cite |
Specifies a URL that points to a source or explanation describing why the content was inserted. |
datetime |
Specifies the date and optionally the time when the content was inserted. |
Example
This example shows a sentence that has been revised. The original closing time is marked with <del>, while the new closing time is marked with <ins>.
Usage Notes
Use the <ins> element when content has been added as part of an edit or revision. It is especially useful when the history of a document or the difference between old and new content should remain visible.
Browsers commonly display inserted text with an underline by default, but the meaning of the <ins> element is that the content was added, not simply that it should appear underlined.
Use the cite attribute when a separate resource explains the reason for the insertion. The value should be a URL referring to that source or explanation.
Use the datetime attribute when the date or time of the change is important. Its value should use a valid machine-readable date or date-and-time format.
The <ins> element is often used with <del> to show content that was removed and the content that replaced it.
If text only needs an underline for visual styling and does not represent inserted content, use CSS such as text-decoration: underline; instead.
Accessibility
Do not rely only on the default underline to communicate that content has been inserted. Some users may not recognize the visual styling, and assistive technologies do not necessarily announce the <ins> element in a special way.
When recognizing revisions is important to understanding the page, provide enough surrounding context so users can determine what changed and why the inserted content matters.
When <ins> and <del> are used together, make sure the revised sentence or section remains understandable when read in sequence.
Browser Support
Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.
For detailed browser compatibility information, see Can I Use: HTML <ins> Element .
Related Elements
<del> - Represents content that has been removed from a document.
<s> - Represents content that is no longer accurate or relevant but is not marked as a document edit.
<u> - Represents text with a non-textual annotation that is conventionally rendered with an underline.
