Skip to content
Related Articles

Related Articles

Improve Article

HTML | datetime Attribute

  • Last Updated : 15 Jul, 2021

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.

<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 datetime object (e.g. 40).
  • TZD: Time Zone Designator (Z denotes Zulu, also known as Greenwich Mean Time)



<!DOCTYPE html>
        HTML ins datetime Attribute
        del {
            color: red;
        ins {
            color: green;
        h1 {
            color: green;
        body {
            text-align: center;
        HTML <ins> datetime Attribute
<p>GeeksforGeeks is a
        <!-- Assigning id to
            'ins' tag -->
        <ins id="GFG"

Output : 

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

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


Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :