HTML datetime property
Example
A section of inserted text, with the date and time when the text was inserted:
This is some text.
This is an inserted text.
Try it »
Browser support





The datetime attribute has no visual effect in ordinary web browsers, but can be used by screen readers.
Definition and Usage
The datetime attribute specifies the date and time when the text was inserted or modified.
Differences between HTML 4.01 and HTML5
none.
Syntax
Attribute values
| Value | Description |
|---|---|
| YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time when the text was inserted or modified.
Explanation of the components: |
HTML tag