The HTML <data>
Element links a given content with a machine-readable translation. If the content is time- or date-related, the {{HTMLElement("time")}} must be used.
This element includes theĀ global attributes.
The following example displays product names but also associates each name with its UPC code.
<p>New Products</p> <ul> <li><data value="3967381398">Mini Ketchup</data></li> <li><data value="3967381399">Jumbo Ketchup</data></li> <li><data value="3967381400">Mega Jumbo Ketchup</data></li> </ul>
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-data-element', '<data>')}} | {{Spec2('HTML WHATWG')}} | No change from {{Spec2('HTML5 W3C')}} |
{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-data-element', '<data>')}} | {{Spec2('HTML5 W3C')}} | Initial definition. |
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoDesktop("22.0")}} {{bug("839371")}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
{{HTMLRef}}