HTML <data> tag

HTML <data> tag

The <data> tag links a given content with a machine-readable translation.

Note: If the content is time- or date-related, the <time> element must be used.

In the following example, the value attribute holds the product id.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <ol> <li> <data value="123">Apple</data> </li> <li> <data value="124">Banana</data> </li> </ol> </body> </html>

Attributes

The following are the attributes of <data> tag. Also try Global attributes.

AttributeValueExplanation
valuemachine-readable formatSpecifies the machine-readable translation of the content of the element.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author