Description
The HTML element <ins> is used to specify a text that has been inserted into an HTML document, which is rendered as underlined text on browsers.
The below table summarizes its usage.
| Usage Details | |
| Placement | It is displayed as a Block or Inline element, based on its content markup. |
| Contents | It can contain Block elements, Inline elements, and text. But it cannot contain Block content when it is used as an Inline element. |
| Tags | Both opening and closing tags are required. |
| Versions | HTML 4, 4.01, 5 |
NOTE: There is a counterpart for the element <ins> which is <del> used for deleted text.
Syntax
Here is the basic syntax of the <ins> element.
<ins>...</ins>
Examples
In the below example, the <del> element is used to markup the deleted text and used the element <ins> to define an inserted text in place of deleted text.
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1>HTML Description List</h1>
<p>My favorite sport is <del>Football</del><ins>Cricket</ins>.
</body>
</html>
Attributes
The following table shows the list of supported and unsupported attributes for the <ins> tag.
| Attribute Type | Details |
| Element-Specific Attributes | The tag <ins> has some element-specific attributes listed in the below table. |
| Global Attributes | Like all other HTML tags, the tag <ins> supports the HTML Global Attributes. |
| Event Attributes | The tag <ins> also supports the HTML Event Attributes. |
Here is a list of attributes that are specific to the <ins> element.
| Attribute | Value | Description |
| cite | URL | Specifies the URL of the document or message that explains the reason for insertion. |
| datetime | YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time when the insert was made. |
Browser Compatibility
The tag <ins> is supported in all modern browsers.
- Google Chrome 1+
- Internet Explorer or Edge 4+
- Firefox 1+
- Apple Safari 1+
- Opera 4+