How to define a time and a date:
![]()
The <time> tag is not supported 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 |
| pubdateNew | pubdate | Indicates that the date/time in the <time> element is the publication date of the document (or the nearest ancestor <article> element) |
The <time> tag also supports the Global Attributes in HTML5.
The <time> tag also supports the Event Attributes in HTML5.
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|