HTML data tag
HTML data tag defines the content and machine readable value of the content in the value attribute.
<data value="1i"> one item </data>
<data value="2i"> second item </data>
<data value="3i"> third item </data>
<data value="4i"> fourth item </data>
</>
one item
second item
third item
fourth item
Machine readable format is in the value of this element. Value contains the id's of items.
Tag Uses
Specific uses of <data> tagIt is used with microformats or in microdata. It provides both the machine-readable value for the data processor and the machine-readable value to use in web browser.
Tag omission
Both starting and ending tags are necessary for the data element.
Global Attributes
All the global attributes are applicable on the data element.
Next Previous
Was this article helpful?