totn HTML

HTML: <ins> tag

This HTML tutorial explains how to use the HTML element called the <ins> tag with syntax and examples.

Description

The HTML <ins> tag is used to markup new text that has been inserted into a document to show the history of changes to a document. Browsers traditionally render the text found within the <ins> tag as underlined text. You can use the companion tag called the <del> tag to markup text that has been deleted from a document but retained to show the history of changes to a document. This tag is also commonly referred to as the <ins> element.

Syntax

In HTML, the syntax for the <ins> tag is:

<body>
<p><ins cite="https://www.techonthenet.com">This new text has been inserted</ins> but this text has not.</p>
</body>

Sample Output


Attributes

In addition to the Global Attributes, the following is a list of attributes that are specific to the <ins> tag:

Attribute Description HTML Compatibility
cite URL for the source that explains why the text was inserted into the document HTML 4.01, HTML5
datetime Date and time that the text was inserted into the document HTML 4.01, HTML5

Note

  • The HTML <ins> element is found within the <body> tag.
  • The <ins> tag is traditionally used to track changes to a document and highlight insertions into the document. The <ins> tag can also be used in diff tools to show source code additions.

Browser Compatibility

The <ins> tag has basic support with the following browsers:

  • Chrome
  • Android
  • Firefox (Gecko)
  • Firefox Mobile (Gecko)
  • Internet Explorer (IE)
  • Edge Mobile
  • Opera
  • Opera Mobile
  • Safari (WebKit)
  • Safari Mobile

Example

We will discuss the <ins> tag below, exploring examples of how to use the <ins> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.