HTML Tag: time
Dates and/or times.
Optional Attributes
| Attribute | Description | Possible values |
|---|---|---|
datetime |
A representation of the element’s date and time contents. | Machine-readable date and/or time (see later). |
| Global attributes | ||
The machine-readable part of the time element (either its contents or the value of its datetime attribute) can take on various forms:
- Year, eg.
2015or0001(must be a four-digit number that is 1 or above) - Month, eg.
2015-5(year-month) - Date, eg.
2015-5-19(year-month-day) or12-25(month-day) - Time, eg.
22:18(hour-minute) or22:18:42(hour-minute-second) - Time-zone offset, eg.
Z(UTC timezone) or+5:00(plus 5 hours) - Date and time, eg.
2015-5-19 22:18,2015-5-19 22:18Zor2015-5-19 17:18+5:00 - Week, eg.
2015-W21(year-week) - Duration, eg.
10h 50m 13s
Example
<p>Juniper was born on <time datetime="2015-5-19 10:18Z">Tuesday 19th May 2015 at 10.18am</time>.</p>
