coderef

<time>Baseline · Widely available

The &#x3C;time> HTML element represents a time, such as a calendar date, clock time, or duration. It may include the datetime attribute to translate dates into machine-readable format.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Oct 24, 2017. Widely available since Apr 24, 2020.

Browser support

DesktopChrome
1–61Not supported
62+Supportedsince Oct 17, 2017
Current: 155
Edge
12–13Not supported
14+Supportedsince Aug 2, 2016
Current: 154
Firefox
1–21Not supported
22+Supportedsince Jun 25, 2013
Current: 157
Safari
1–9.1Not supported
10+Supportedsince Sep 20, 2016
Current: 27
MobileChrome Android
18–61Not supported
62+Supportedsince Oct 24, 2017
Current: 155
Firefox Android
4–21Not supported
22+Supportedsince Jun 25, 2013
Current: 157
Safari iOS
1–9.3Not supported
10+Supportedsince Sep 13, 2016
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: HTMLTimeElement.

Feature detection

JS · check before using
const el = document.createElement("time");
if (!(el instanceof HTMLUnknownElement)) {
  // <time> is supported
}

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
HTMLTimeElement62142210622210
HTMLTimeElement.dateTime62142210622210
time621422762224
time.datetime621422762224