HTML <ins> Tag

The <ins> tag in HTML is used to specify a block of inserted text. The <ins> tag is typically used to mark a range of text that has been added to the document. The inserted text is rendered as underlined text by the web browsers although this property can be changed using CSS text-decoration property. The <ins> tag requires a starting and ending tag.

Syntax:

<ins> Contents... </ins>

Attributes: The <ins> tag contains two attributes which are listed below:

  • cite: It is used to specify the URL of the document or message which denotes the reason of inserting the text.
  • datetime: It is used to specify the date and time of the inserted text. The datetime is inserted in the format YYYY-MM-DDThh:mm:ssTZD.

Below programs illustrate the <ins> element in HTML:

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
    <head
        <title>ins Tag</title
        <style
            del { 
                color: red; 
            
            ins { 
                color: green; 
            
            h1 { 
                color:green; 
            
            body { 
                text-align:center; 
            
        </style>  
    </head
    <body
        <h1>GeeksforGeeks</h1
        <h2><ins> Tag</h2
        <p>GeeksforGeeks is a <del>mathematical</del
        <ins>computer</ins> science portal</p>  
    </body
</html>     

chevron_right


Output:

Example 2: This example uses the <ins> tag with the datetime attribute.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
    <head
        <title>ins Tag</title
        <style
            del { 
                color: red; 
            
            ins { 
                color: green; 
            
            h1 { 
                color:green; 
            
            body { 
                text-align:center; 
            
        </style>  
    </head
    <body
        <h1>GeeksforGeeks</h1
        <h2><ins> Tag</h2
        <p>GeeksforGeeks is a <del>mathematical</del
        <ins datetime="2018-11-21T15:55:03Z">computer</ins>
        science portal</p
    </body
</html>            

chevron_right


Output:

Supported Browsers: The browser supported by <ins> tag are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.