HTML <data> Tag
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
Please Login to comment...