HTML ins Tag: How to Mark Inserted Text in a Document

HTML ins Tag

The <ins> tag in HTML shows text that the author added after the original content. This helps readers know what is new in a document. Many sites use this tag when they update articles, legal papers, or user guides.

The tag can also appear with the <del> tag to show both removed and added parts.

Understand the <ins> Tag in HTML

The <ins> tag marks text as an addition to existing content. Browsers show this text with an underline by default. It can also hold the date and reason for the change.

You can write the <ins> tag with two optional attributes.

  • cite points to a link that explains the reason for the change.
  • datetime records when the change happened.
<ins cite="URL" datetime="YYYY-MM-DDTHH:MM:SSZ">Inserted text here</ins>

It shows the text with a style that marks it as new when a browser finds the <ins> tag. The default style is underline, but CSS can change this look.

Readers can hover on the text if you use the cite attribute to see the link with details.

The Differences Between <ins> Tag vs <del> Tag

The <ins> tag shows new text that you add to the content, while the <del> tag marks text that you remove from the content.

Both tags can work together to show changes in one place. Here is a table that shows you key differences:

Feature<ins><del>
PurposeShows text added to contentShows text removed from content
Default StyleUnderlineStrikethrough
Attributescite, datetimecite, datetime
Common UseUpdates, correctionsRemovals, replacements

Here is the use case for each one:

  • Use <ins> when you add rules to a contract or update a guide.
  • You can use the <del> when you remove wrong or outdated text from a report.

Examples of the <ins> Tag in HTML

Basic Inserted Text:

<p>This is my original text. <ins>Here is the new part.</ins></p>

This example adds a short piece to the sentence. The <ins> tag makes it easy for the reader to notice the change.

Inserted Text with Date:

<p>We meet every week. <ins datetime="2025-08-11">Now we meet every two weeks.</ins></p>

This example records the date of the update. Readers know exactly when the new meeting rule took effect.

Inserted Text with a Reason Link:

<p>All staff must follow the rules. <ins cite="https://example.com/rules-update">New rules were added for safety.</ins></p>

This example gives a source for the update. The link in cite shows the document that explains the new safety rules.

Wrapping Up

In this article, you learned the purpose of the <ins> tag and how it works in HTML. You also saw how it differs from the <del> tag, and how to write both with attributes for date and source. Here is a quick recap:

  • <ins> shows added text in a document.
  • It can have cite and datetime attributes.
  • <del> marks removed text.
  • You can use both tags together for edits.

FAQs

What is the use of <ins> tag in HTML?

The <ins> tag in HTML represents inserted text in a document. It usually appears with an underline by default. Example:
<p>This is <ins>new</ins> text.</p>

How do you style the <ins> tag with CSS?

You can style the <ins> tag using CSS selectors. Example:
ins {
  color: red;
  text-decoration: underline;
}

What is the difference between <ins> and <del> in HTML?

The <ins> tag marks inserted text, while <del> marks deleted text. Example:
<p>I like <del>tea</del> <ins>coffee</ins>.</p>

Can <ins> tag have datetime attribute in HTML?

Yes, <ins> supports the datetime attribute to indicate when text was added. Example:
<ins datetime="2025-08-11">Updated text</ins>

Similar Reads

HTML Small Tag: How to Make Text Small

The HTML small tag displays text in a smaller font size than nearby text. It shows less important or side…

HTML source Tag: How to Embed Media with Examples

The source tag in HTML helps load different media formats and screen sizes. You can use it inside many other…

HTML Compatibility: Old vs New Browsers

HTML code does not always show the same result on every browser. Old browsers follow outdated rules while modern browsers…

HTML pre Tag: How to Display Preformatted Text

The HTML <pre> tag keeps the original format of your text. It shows spaces and line breaks exactly as you…

HTML kbd Tag: How to Show Keyboard Input with examples

The HTML<kbd> tag shows the keys that a user must press. This helps you to give instructions for commands or…

HTML bdi Tag: Control Text Direction in HTML

The HTML bdi tag marks text that has an unknown or mixed direction. It makes sure that this part does…

HTML Legend Tag: How it Works in Fieldset Tag with Examples

In this article, you will learn how HTML legend works in the fieldset tag with examples. HTML fieldset and legend…

HTML Form novalidate Attribute: How it Works with Examples

The form novalidate attribute in HTML lets you skip browser checks when you submit a form. You can control errors…

HTML output Tag: How to Display Calculation Results

The <output> tag in HTML shows results inside a form. It helps display values from user actions or scripts. You…

HTML var Tag: Variables in Text

The HTML <var> tag marks a word or phrase as a variable in a document. Web authors use it to…

Previous Article

JavaScript Symbol Type: How it Works with Examples

Next Article

PHP array_shift: Remove the First Array Element with Examples

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *


Subscribe to Get Updates

Get the latest updates on Coding, Database, and Algorithms straight to your inbox.
No spam. Unsubscribe anytime.