HTML <data> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

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
Edge Chrome Firefox Opera Safari
1862224910
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
62224610862

Last updated by CSSPortal on: 30th March 2024