Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML <data> Tag

Improve Article
Save Article
Like Article
  • Difficulty Level : Basic
  • Last Updated : 19 Jul, 2022
Improve Article
Save Article
Like Article

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 and above
  • Edge 18.0 and above
  • Internet Explorer not supported
  • Apple Safari 10 and above
  • Firefox 22.0 and above
  • Opera 49.0 and above

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!