Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

How to define a text element that inserted into a document in HTML5 ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In this article, we will learn how to define some text that has been inserted into a document. This can be used to show recent changes in the text content and is mostly used after the text that is to be deleted or is outdated.

Approach: We will use the <ins> element to specify text that has been inserted into the document. The browser usually adds an underline to the text present in this tag to distinguish it from the rest of the content. This element has two attributes that can be used to specify the citation and the time that the change was made.

Syntax:

<ins> Inserted Text </ins>

The below example illustrates the <ins> element to define the text that has been inserted into a document.

Example: In this example, we are using the above-explained approach.

HTML




<!DOCTYPE html>
<html>
<body>
    <h1 style="color: green;">
        GeeksforGeeks
    </h1>
    <b>
        How to define a text that has been
        inserted into a document
    </b>
 
    <!-- Simple usage of <ins> element -->
    <p>
        The exam would be held on <del>Monday</del>
        <ins>Friday</ins> at 5PM.
    </p>
 
    <!-- Using the <ins> element with the
        cite and datetime attribute -->
    <p>
        The venue for the exam is <del>Hall A</del>
        <ins cite="https://www.geeksforgeeks.org"
            datetime="2018-11-21T15:55:03Z">
            Hall C
        </ins>.
    </p>
</body>
</html>

Output:

My Personal Notes arrow_drop_up
Last Updated : 06 Jun, 2023
Like Article
Save Article
Similar Reads
Related Tutorials