data
Links content with a machine-readable value.
Description
The <data> element links a given piece of content with a machine-readable translation. If the content is time- or date-related, use the <time> element instead.
The value attribute provides the machine-readable equivalent of the element's content. This is useful for data processors, search engines, or scripts that need to work with the data in a standardized format.
Basic Example
The price is $49.99.
Product Identifiers
Use <data> to associate products with their identifiers:
- Wireless Headphones - $79.99
- Bluetooth Speaker - $49.99
- USB-C Cable - $12.99
Non-Date Values
While dates should use <time>, <data> can store date strings when appropriate:
The event is scheduled for June 15th, 2024.
Note: For dates and times, prefer using the <time> element with its datetime attribute.
Currency Values
Store normalized currency values while displaying localized formats:
| USA | $1,000 |
| UK | £800 |
| EU | €900 |
Attributes
| Attribute | Description |
|---|---|
value |
Required. The machine-readable translation of the element's content. |
This element also supports global attributes.
Accessibility
The <data> element has no special accessibility behavior. Screen readers will read the visible content, not the value attribute. The value is intended for machine processing.