HTML Tutorial

HTML Tag: <ins>

Understanding the <ins> Tag

The <ins> tag (short for "insertion") is used to indicate inserted or newly added text within a web page. It allows you to mark content as being added, differentiating it from existing text.

Usage

To use the <ins> tag, simply wrap the inserted text within the opening and closing tags:

<ins>Inserted text here</ins>

Attributes

The <ins> tag supports only one attribute:

  • cite: The URL of the resource that contains the referenced change

Example

Consider the following HTML code:

<p>The original text was: "This is the original text."</p>
<p>The modified text is: <ins>"This is the original text, with added information."</ins></p>

Output:

The original text was: "This is the original text." The modified text is: "This is the original text, with added information."

Exploring the <ins> Tag in Action

To visualize how the <ins> tag works, try the following steps:

  1. Create a new HTML file.
  2. Paste the following code into the file:
<!DOCTYPE html>
<html>
<head>
  <title>Exploring the &lt;ins&gt; Tag</title>
</head>
<body>
  <h1>Before Insertion</h1>
  <p>This text already exists on the page.</p>

  <h1>After Insertion</h1>
  <p>This text is <ins>inserted into the page</ins> using the &lt;ins&gt; tag.</p>
</body>
</html>
  1. Save the file with an .html extension.
  2. Open the file in a web browser.

You will see that the text "inserted into the page" is highlighted, indicating that it was added to the document.