Skip to content
Related Articles

Related Articles

Improve Article

HTML <data> Tag

  • Difficulty Level : Basic
  • Last Updated : 09 Feb, 2021

The <data> element gives an address to a given content with a machine-readable translator. This element provides a machine-readable value for the processors and a human-readable value that rendered in the browser.
 

Syntax: 

<data value=""> Contents... </data>

Attributes: This tag accepts a single attribute as mentioned above and described below.

  • value: It contains a single machine-readable translation of the content.

Note: If the content is a date or time-related content, then use <time> element instead of the data element.
Example: 

HTML




<!DOCTYPE html>
<html>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2><data> Tag</h2>
         
<p>GeeksforGeeks Subject List:</p>
 
        <ul>
          <!-- data Tag starts here -->
             <li><data value="009">Data Structure</data></li>
             <li><data value="010">Algorithm</data></li>
             <li><data value="011">HTML</data></li>
             <li><data value="019">Operating System</data></li>
             <li><data value="110">Computer Network</data></li>
             <li><data value="111">DBMS</data></li>
          <!-- data Tag ends here -->
        </ul>
    </body>
</html>

Output: 
 



Supported Browsers: 

  • Google Chrome 62.0
  • Internet Explorer
  • Firefox 22.0
  • Opera 49.0

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :