<ins>

Term side of the Card.
Topic: Semantics
Unit title: <ins>
Categories: Tag
Explanation side of the Card

Explanation: The element that represents content that has been added to a document. It's typically rendered with an underline and can be used in combination with `<del>` to show changes made to a document.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1.
  • The edge browser supports this feature starting from version 12.
  • The firefox browser supports this feature starting from version 1.
  • The safari browser supports this feature starting from version 4.
Availability: 

Example

Wronghtml
<p>
  Meeting at <u>3pm</u>
</p>
Righthtml
<p>
  Meeting at <del>2pm</del> <ins datetime="2024-05-01">3pm</ins>
</p>

<ins> marks added content as an edit, and datetime records when it changed.

Common mistakes

  • Using <ins> just to underline text.
  • Showing edits with <ins> but no <del> for the removed part.

Interview questions

What is the difference between <ins> and <u>?

<ins> means content was added to the document, while <u> marks non-textual annotation like a spelling error.

Can <ins> wrap block content?

Yes. <ins> can contain whole paragraphs or lists when the inserted content is block-level.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy