HTML <data> Tag
Description
The <data>
HTML tag is a relatively new element introduced in HTML5, designed to provide semantic meaning to its enclosed content by denoting that it contains machine-readable data. It is often used to mark up numerical or quantitative data within the document, making it easier for web developers and search engines to recognize and process the information. This tag is valuable for creating structured and accessible web content, especially when combined with other elements like <time>
or <meter>
to represent data in a meaningful and standardized manner.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- low content, phrasing content, palpable content.
- Start/End Tags
- Start tag: required, End tag: required
Example
<p>New Products</p>
<ul>
<li><data value="398">Mini Ketchup</data></li>
<li><data value="399">Jumbo Ketchup</data></li>
<li><data value="400">Mega Jumbo Ketchup</data></li>
</ul>
Attributes
Attribute | Definition |
---|---|
value | This attribute specifies the machine-readable translation of the content of the element. |
Global Attributes
The <data>
tag also supports the Global Attributes in HTML5
Event Attributes
None
Browser Support
The following table will show you the current browser support for the HTML <data>
tag.
Desktop | |||||
18 | 62 | 22 | 49 | 10 |
Tablets / Mobile | |||||
62 | 22 | 46 | 10 | 8 | 62 |
Last updated by CSSPortal on: 30th March 2024