Data tag in html

The <data> tag links the given content with a machine-readable translation.
It associates the numbers with given names min the data.


<!DOCTYPE html>
<html>
<body>

<p>The following example displays product names but also associates each name with a product number:</p>

<ul>
  <li><data value="21053">Cherry Tomato</data></li>
  <li><data value="21054">Beef Tomato</data></li>
  <li><data value="21055">Snack Tomato</data></li>
</ul>

</body>
</html>


Output:
The following example displays product names but also associates each name with a product number:
     
  • Cherry Tomato
  •  
  • Beef Tomato
  •  
  • Snack Tomato

Comments

Popular posts from this blog

Headings In HTML

Introduction and Format of HTML

Font Tag