<data>: The Data element
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since October 2017.
The <data>
HTML element links a given piece of content with a machine-readable translation. If the content is time- or date-related, the <time>
element must be used.
Try it
Attributes
This element's attributes include the global attributes.
value
-
This attribute specifies the machine-readable translation of the content of the element.
Examples
The following example displays product names but also associates each name with a product number.
html
<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>
Result
Technical summary
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. |
Implicit ARIA role |
generic
|
Permitted ARIA roles | Any |
DOM interface | HTMLDataElement |
Specifications
Specification |
---|
HTML # the-data-element |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
data | ||||||||||||
value |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- The HTML
<time>
element.