Tutorialspoint.dev

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:



<!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>     

Output:

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

<!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>            

Output:

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

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


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter