HTML | <ins> datetime Attribute

The <ins> datetime Attribute in TML is used to specify the date and time of the inserted text. The date-time is inserted in the format YYYY-MM-DDThh:mm:ssTZD.

Syntax:

<ins datetime="YYYY-MM-DDThh:mm:ssTZD">

Attribute Values: This attribute contains single value YYYY-MM-DDThh:mm:ssTZD which is used to specify the date and time when the text was deleted.
The explanation of datetime components are listed below:



  • YYYY: It sets the year of datetime object (e.g. 2009).
  • MM: It sets the month of datetime object (e.g. 05 for March).
  • DD: It sets the day of the month of datetime object (e.g. 04).
  • T: It is a required separator.
  • hh: It sets the hour of datetime object (e.g. 18 for 06.00pm).
  • mm: It sets the minutes of datetime object (e.g. 34).
  • ss: It sets the seconds of dattime object (e.g. 40).
  • TZD: Time Zone Designator (Z denotes Zulu, also known as Greenwich Mean Time)

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
  
<head
    <title>
        HTML ins datetime Attribute 
    </title
      
    <style
        del { 
            color: red; 
        
          
        ins { 
            color: green; 
        
          
        h1 { 
            color: green; 
        
          
        body { 
            text-align: center; 
        
    </style
</head
  
<body
    <h1>GeeksforGeeks</h1
      
    <h2>
        HTML <ins> datetime Attribute
    </h2
  
    <p>GeeksforGeeks is a 
        <del>mathematical</del
  
        <!-- Assigning id to 
            'ins' tag -->
        <ins id="GFG"
            datetime="2018-11-21T15:55:03Z"
            computer 
        </ins>scienceportal
    </p>
</body
  
</html>                    

chevron_right


Output :

Supported Browsers: The browser supported by HTML <ins> datetime Attribute are listed below:

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


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

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.