- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML Tag
The <data> tag in HTML is used to set the current content with machine readable by translating it.
Syntax
Following is the syntax −
<data value=””>
Above, value sets the machine-readable form of the content.
Example
Let us now see an example to implement the <data> tag −
<!DOCTYPE html> <html> <body> <h2>Subjects covered in Schools</h2> <p>Associating the subject name with number:</p> <ul> <li><data value="1000">Maths</data></li> <li><data value="1003">Science</data></li> <li><data value="1009">English</data></li> <li><data value="1030">Political Science</data></li> <li><data value="1045">French</data></li> </ul> </body> </html>
Output
This will produce the following output −
In the above example, we have set number to the content by translation −
<ul> <li><data value="1000">Maths</data></li> <li><data value="1003">Science</data></li> <li><data value="1009">English</data></li> <li><data value="1030">Political Science</data></li> <li><data value="1045">French</data></li> </ul>
We set the machine-readable form to content using the <data> element −
<data value="1000"> Maths </data>
Advertisements