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 template Tag: How it Works with Examples

The HTML <template> tag lets you store HTML content that won’t show up right away. JavaScript can pull it in…

HTML audio Tag: How to Embed and Control Sound in Pages

The audio tag adds sound to web pages without plugins. It gives you control to play, pause, loop, or mute…

HTML hr Tag: Horizontal Rules

The <hr> tag in HTML gives you a fast way to split content with a clean horizontal line. You may…

HTML samp Tag: How to Show Sample Program Output

The HTML samp tag shows the result of a computer program or command. It helps readers know which text came…

How to Use HTML div Tag – Examples & Group Content

In this article, you will cover how to use div tag in HTML layout. It offers beginner to advanced code…

HTML Nav Tag: How to Create Navigation Menus

The nav tag defines a navigation block in HTML. It holds main links to other parts of your site. Search…

HTML Section Tag: How It Works with Examples

The HTML section tag groups parts of a web page that share one theme. It gives clear meaning to content.…

HTML br Tag: Line Breaks

The br tag adds a single line break in HTML. It is an empty tag that does not need a…

HTML List Tag: Understand the ul, ol, and dl Lists

HTML has three main list tags: <ul>, <ol>, and <dl>. Each one shows a different kind of group. In this…

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…

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.