W3cubDocs

/HTML

<data>

The HTML <data> element links a given content with a machine-readable translation. If the content is time- or date-related, the <time> element must be used.

Content categories Flow content, phrasing content, palpable content.
Permitted content Phrasing content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts phrasing content.
DOM interface HTMLDataElement

Attributes

This element's attributes include the global attributes.

value
This attribute specifies the machine-readable translation of the content of the element.

Example

The following example displays product names but also associates each name with a product number.

<p>New Products</p>
<ul>
 <li><data value="398">Mini Ketchup</data></li>
 <li><data value="399">Jumbo Ketchup</data></li>
 <li><data value="400">Mega Jumbo Ketchup</data></li>
</ul>

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<data>' in that specification.
Living Standard No change from HTML5
HTML5
The definition of '<data>' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support (Yes) 22.0 (22.0) bug 839371 No support No support No support
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support (Yes) No support No support No support No support

See also

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data