HTML DATA <data> Tag
0 1965
The HTML DATA <data> tag define a machine-readable translation version of its own contents. This can be useful in cases where you need the contents provided in an alternative format.
It generates machine-readable value for data processors and a human-readable value for rendering in a browser.
Note:
If the related content is like time- or date, then we should use <time> element instead of the data element.
Code:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML Data Element</title> </head> <body> <h1>The data element</h1> <p>The following example displays Programming names but<br> also associates each name with a programming number:</p> <ul> <li><data value="11001">jQuery</data></li> <li><data value="11002">JavaScript</data></li> <li><data value="11003">PHP</data></li> </ul> </body> </html>
Share:
Comments
Waiting for your comments