
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML datetime Attribute
The datetime attribute of the <ins> element is used to specify the date and time displaying when the text was inserted.
Following is the syntax −
<ins datetime="YYYY-MM-DDThh:mm:ssTZD">
Above, the attribute datatime displays the datetime when the text was inserted in the following format −
- YYYY - year
- MM - month
- DD - day of the month
- hh - hour
- mm - minutes
- ss - seconds
- TZD - Time Zone Designator
Let us now see an example to implement the datetime attribute of the <ins> element −
Example
<!DOCTYPE html> <html> <body> <h1>Demo Heading</h1> <ins cite = "new.htm" datetime = "2019-05-11T18:30:03Z">Text is inserted.</ins> </body> </html>
Output
In the above example, we have inserted a text using the <ins> element −
<ins cite = "new.htm" datetime = "2019-05-11T18:30:03Z"> Text is inserted. </ins>
Above, we have set the reason of insertion using the cite attribute −
cite="new.htm
With that, we have set the date of insertion using the datetime attribute −
datetime = "2019-05-11T18:30:03Z
- Related Articles
- HTML DOM ins dateTime Property
- HTML datetime Attribute
- HTML DOM Ins Object
- HTML DOM ins cite Property
- HTML DOM Time dateTime Property
- HTML DOM del dateTime Property
- HTML DOM Input Datetime Object
- HTML pattern Attribute
- HTML novalidate Attribute
- HTML maxlength Attribute
- HTML wrap Attribute
- HTML disabled Attribute
- HTML for Attribute
- HTML min Attribute
- HTML disabled Attribute

Advertisements