HTML <data> Tag

By Jonathan Griffin. Editor, SEO Consultant, & Developer.

· 1 min read

Definition

The <data> Tag links its content with a machine-readable form of that content via the value attribute.

Example

The following example links the ISBN to the name of the book.

<p>Lord of the Rings books:</p>
<ul>
    <li><data value="9780553714784">The Fellowship of the Ring</data></li>
    <li><data value="9780739301197">The Two Towers</data></li>
    <li><data value="9780788789557">The Return of the King</data></li>
</ul>

Usage

  • The <data> element must be used with the value attribute.
  • The value attribute must be a representation of the element’s contents.

Attributes

The Data element supports the Global Attributes, along with the following:

  • value

    The value attribute specifies the machine-readable translation of the content.

Best Practices

  • Where the value attribute represents a date or time, then the more specific <time> element should be used.

Specification

Browser Support

Desktop

ChromeEdgeFirefoxIEOperaSafari
YesYesYesNoYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
YesYesYesYesYesYes