Français

<data>

Associate a machine-readable value with human text

  • HTML
  • accessibility
  • semantics

<data> — The machine value

The <data> element associates a machine-readable value with human-readable text. The value attribute holds the normalized version: product ID, ISBN, price, code.

When to use it

You want to display a price, a product ID, or an ISBN in human-readable text while exposing the raw value to scripts and crawlers. You display "twenty-three euros" but the machine reads 23.00. You display "The Little Prince" but the machine reads 978-2-07-040850-4.

What you gain

Accessibility: the displayed text stays readable for humans. Assistive technologies read the text content, not the value.

SEO: <data> alone is not exploited by search engines. Its value appears when you combine it with Schema.org microdata (itemprop).

Code example

<p>
  Price: <data value="23.00">twenty-three euros</data>
</p>
 
<ul>
  <li><data value="978-2-07-040850-4">The Little Prince</data></li>
  <li><data value="978-2-07-036822-8">Nightflight</data></li>
</ul>

Further reading