coderef

<data>Baseline · Widely available

The &#x3C;data> element links a given piece of content with a machine-readable translation.

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: HTMLDataElement.

Feature detection

JS · check before using
const el = document.createElement("data");
if (!(el instanceof HTMLUnknownElement)) {
  // <data> 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
HTMLDataElement62142210622210
HTMLDataElement.value62142210622210
data62142210622210
data.value62142210622210