<time> Redirect 2

The HTML <time> element represents either a time on a 24-hour clock or a precise date in the Gregorian calendar (with optional time and timezone information).

This element is intended to be used presenting dates and times in a machine readable format. This can be helpful for user agents to offer any event scheduling for user's calendar. 

Usage note: This element is not appropriate for instances where a specific date cannot be calculated, nor should it be used for dates prior to the introduction to the Gregorian calendar (due to complications with calculating those dates).

Attributes

Like all other HTML elements, this element supports the global attributes.

datetime
This attribute indicates the time and date of the element and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp.

Examples

Simple example

<p>The concert starts at <time>20:00</time>.</p>

Above HTML will output:

The concert starts at 20:00.

datetime example

<p>The concert took place on <time datetime="2001-05-15 19:00">May 15</time>.</p>

Above HTML will output:

The concert took place on May 15.

Specifications

Specification Status Comment
WHATWG HTML Living Standard Living Standard No change from HTML5.1 (draft)
HTML5.1 (draft) Working Draft No change from HTML5
HTML5 Candidate Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Not supported 22.0 (22.0) ? 11.50
Removed in 15.0
Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported Not supported 22.0 (22.0) ? 11.50
Removed in 15.0
Not supported

See also

  • The <data> element, allowing to signal other kind of values.

Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,