
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
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>
- Related Articles
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML tag
- HTML Tag
- HTML Tag
- HTML Tag
- HTML Tag

Advertisements