How to define a time and a date:
The <time> tag defines a human-readable date/time.
This element can also be used to encode dates and times in a machine-readable way so that user agents can offer to add birthday reminders or scheduled events to the user's calendar, and search engines can produce smarter search results.
The numbers in the table specify the first browser version that fully supports the element.
Element | |||||
---|---|---|---|---|---|
<time> | 6.0 | 9.0 | 4.0 | 5.0 | 11.1 |
The <time> tag is new in HTML5.
= New in HTML5.
Attribute | Value | Description |
---|---|---|
datetime | datetime | Represent a machine-readable date/time of the <time> element |
The <time> tag also supports the Global Attributes in HTML.
The <time> tag also supports the Event Attributes in HTML.
HTML DOM reference: Time Object
None.