HTML <data> Tag
- Previous Page <colgroup>
- Next Page <datalist>
Definition and Usage
<data>
Tags are used to add machine-readable translations for given content.
This element provides both machine-readable values for data processors and human-readable values for presentation in browsers.
Tip:If the content is related to time or date, please use <time> element.
Example
This example displays product names and also associates each name with a product number:
<ul> <li><data value="10535">Cerasus Tomato</data></li> <li><data value="10536">Beef Tomato</data></li> <li><data value="10537">Snack Tomato</data></li> </ul>
Attribute
Attribute | Value | Description |
---|---|---|
value | machine-readable format | Specifies the machine-readable translation of the element content. |
Global Attributes
<data>
The tag also supports Global Attributes in HTML.
Browser Support
The numbers in the table indicate the first browser version to fully support this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
62.0 | 13.0 | 22.0 | Not Supported | 49.0 |
- Previous Page <colgroup>
- Next Page <datalist>