HTML DATA TAG || Data Tag in HTML
×

HTML DATA <data> Tag

1830

The HTML DATA <data> tag define a machine-readable translation version of its own contents. This can be useful in cases where you need the contents provided in an alternative format.

It generates machine-readable value for data processors and a human-readable value for rendering in a browser.

Note:

If the related content is like time- or date, then we should use <time> element instead of the data element.

Code:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML Data Element</title>
</head>
<body>

<h1>The data element</h1>
<p>The following example displays Programming names but<br> also associates each name with a programming number:</p>
<ul>
  <li><data value="11001">jQuery</data></li>
  <li><data value="11002">JavaScript</data></li>
  <li><data value="11003">PHP</data></li>
</ul>

</body>
</html>


Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments