How to use < data > tag in HTML ? with example

 How to use < data > tag in HTML ? with example


The <data> tag is used to add a machine-readable translation of a given content or text . This element provides both a machine-readable value for data processors, and a human-readable value for rendering in a browser.


Example

<html>

<body>


<h1>The data element Example</h1>


<p>The following example web development programming language  :</p>


<ul>

  <li><data >HTML</data></li>

  <li><data>CSS</data></li>

  <li><data >JAVASCRIPT</data></li>


</ul>

</body>

</html>


and 


<html>

<body>


<h1>The data element Example</h1>


<p>The following example of green vegetable with product name and product code :</p>


<ul>

  <li><data value ="2344 " >TOMATO</data></li>

  <li><data value ="5678 ">CAPSICUM</data></li>

  <li><data  value ="6545 ">CABBAGE</data></li>


</ul>

</body>

</html>

Comments

Last 7 Days

How to use autoplay and mute attribute with < video > tag in HTML for youtube ? with example