Loading...
HTML <data> Tag

HTML <data> Tag

In this tutorial, we will learn about data tag in HTML with the help of examples.


<data> Tag

Data tag <data> is used to add machine readable version of its own contents.
<data> tag provides both a machine-readable ,and a human-readable value for rendering in browser.

Syntax

<data>.....</data>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Data Tag</title>
  </head>
  <body>
    <data value = "10">Ten</data>
  </body>
</html>

Output

Ten

Specific Attribute

Attribute Value Description
value machine-readable format Specifies the machine-readable version of the content of the element

Global Attribute

Data Tag support all the global attributes of HTML.


Event Attribute

Data Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of data tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML datalist Tag.

- Related Topics