HTML datetime Attribute Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The HTML datetime attribute specifies the date and time associated with the content, facilitating machine-readable information. It's commonly used with elements like <time> to provide structured time-related data.Syntax<element datetime="YYYY-MM-DDThh:mm:ssTZD"> Attribute ValuesThis attribute contains a 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 is 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).ZD: Time Zone Designator (Z denotes Zulu, also known as Greenwich Mean Time)Applicabledatetime attribute is applicable for:<del>Represents deleted or removed text within a document.<ins>Represents inserted or added text within a document.<time>Represents a specific period of time or a datetime stamp.HTML datetime Attribute ExampleExample : In this example we demonstrates the <ins> tag to represent inserted or added text, marking the change from "mathematical" to "computer" in the content. html <!DOCTYPE html> <html> <head>HTML datetime Attribute </head> <body> <h2>HTML 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: HTML datetime Attribute example outputSupported BrowsersThe browsers supported by datetime Attribute are listed below: Google ChromeEdge Firefox OperaSafari Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Explore HTML Tutorial 11 min read BasicsHTML Introduction 5 min read HTML Editors 5 min read HTML Basics 7 min read HTML Structure & ElementsHTML Elements 5 min read HTML Attributes 8 min read HTML Headings 4 min read HTML Paragraphs 5 min read HTML Text Formatting 4 min read HTML Block and Inline Elements 3 min read HTML Charsets 4 min read HTML ListHTML Lists 5 min read HTML Ordered Lists 5 min read HTML Unordered Lists 4 min read HTML Description Lists 3 min read HTML Visuals & MediaHTML Colors 11 min read HTML Links Hyperlinks 3 min read HTML Images 7 min read HTML Favicon 4 min read HTML Video 4 min read HTML Layout & DesignHTML Tables 10 min read HTML Iframes 4 min read HTML Layout 4 min read HTML File Paths 3 min read HTML Projects& Advanced TopicsHTML Forms 5 min read HTML5 Semantics 6 min read HTML URL Encoding 4 min read HTML Responsive Web Design 11 min read Top 10 Projects For Beginners To Practice HTML and CSS Skills 8 min read HTML Tutorial ReferencesHTML Tags - A to Z List 15+ min read HTML Attributes Complete Reference 8 min read HTML Global Attributes 5 min read HTML5 Complete Reference 8 min read HTML5 MathML Complete Reference 3 min read HTML DOM Complete Reference 15+ min read HTML DOM Audio/Video Complete Reference 2 min read SVG Element Complete Reference 5 min read SVG Attribute Complete Reference 8 min read SVG Property Complete Reference 7 min read HTML Canvas Complete Reference 4 min read Like