Hurry! Try our new Interactive Courses for FREE. 🥳   🚀
  Signup/Sign In

HTML ins Tag

The HTML <ins> tag is used to indicate the text that has been inserted into the document.

  • The <ins> tag is basically used to provide information about changes or updates made to any web document or web page.

  • It renders the enclosed text inside <ins> tag as underlined text.

So if you have some textual information available on your webpage, and you make some update to the text, then you can use the <ins> tag, to inform the browser that a certain part of the text on a webpage is newly inserted or updated.

HTML <ins> Tag - Syntax and Usage

The <ins> element requires the start(opening) tag and end(closing) tag.

The basic syntax for the same is given below:

<ins>
    some text
</ins>

HTML <ins> Tag Basic Example

Below we have a basic example for the <ins> tag:

In the code example above we have some text in the usual paragraph tag <p>, while the last line is in the <ins> tag to show that part of the text is inserted into the original text.

This tag is just to follow proper HTML usage and is useful as then search engines like Google can know that text/content on a webpage has been updated or a new section has been inserted. For example, on Terms and Condition page or the Privacy Policy page of any website, if some new text is added then <ins> tag can be used.

HTML <ins> Tag Attributes

This element does not have any specific attributes but it does have two attributes that are frequently used along with the usual Global attributes and Event attributes.

The two attributes used with the <ins> tag is:

  • cite: This is used to specify a URL that indicates why the text has been updated or changed.

  • datetime: This is used to specify the date and time of the last update in text. The default format of DateTime is YYYY-MM-DDThh:mm:ssTZD

Let's take an example:

<!doctype html>
    <head>
        <title>
            Example of The INS element
        </title>
    </head>
    <body>
        <p>HTML stands for Hypertext Markup Language.</p>
        <p>HTML is the basic building block of any webpage. It is used with CSS and Javascript to create interative web pages.</p>
        <p><ins cite="https://en.wikipedia.org/wiki/HTML5" datetime="2014-10-28T00:00:00TZD">HTML5 is the latest version of HTML</ins></p>
    </body>
</html>

Default CSS Settings for HTML <ins> Tag

Most of the Browsers use these default CSS Settings:

ins {
    text-decoration: underline;
}

Browser Support for HTML <ins> Tag

Following browsers support this attribute:

  • Firefox 1+

  • Google Chrome 1+

  • Internet Explorer 4+

  • Apple Safari 1+

  • Opera 4+