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> tag

It 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.

Tag Attributes

Attributes that are applicable to <data> tag
value

value attribute defines the machine-readable value of the content.

<a href="address of external resource/URL">anchor text</a>


Was this article helpful?

 

Email:

Message: