Junior JavaScript

What is the use of the <data> tag?

It links human-readable text with a machine-readable value — useful for analytics or scripts.

Follow me on LinkedIn:

Example:

<p>Price: <data value="499">₹499</data></p>

Key Takeaway:

<data> helps embed structured data inside readable content.

More from JavaScript Tutorial

All questions for this course