How to define a time and a date:
![]()
The <time> tag does not render as anything special in any of the major browsers.
The <time> tag defines either a time (24 hour clock), or a date in the Gregorian calendar, optionally with a time and a time-zone offset.
This element can be used as a way to encode dates and times in a machine-readable way so that, for example, 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 <time> tag is new in HTML5.
New : New in HTML5.
| Attribute | Value | Description |
|---|---|---|
| datetimeNew | datetime | Gives the date/time being specified. Otherwise, the date/time is given by the element's contents |
The <time> tag also supports the Global Attributes in HTML.
The <time> tag also supports the Event Attributes in HTML.
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.