Example

A simple <data> tag:

Laboratory

description & Usage

The <data> tag is used to add a machine-readable translation (computer or robot).

Using this tag we can:

  • Displayable value in browsers (between two tags)
  • Equivalent to that value for machines (in the value attribute)

to display.

Consider the following example:

<p>
     <data value="code-3522">HP Spectre x360 Laptop</data>
</p>

To use the time and date, we use the <time> tag.

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
<data>

Attributes

Attributes Values Description
value
machine-readable format
Specifies the value of the corresponding tags in the side.

Global Attributes

The <data> tag supports the HTML Global Attributes.

Event Attributes

The <data> tag supports the HTML Event Attributes.