HTML5 - Data Tag

HTML5 Data Tag

The HTML <data> tag is used for providing a machine-readable version of its own contents. This can be useful in cases where your data needs to be in a certain format because it may be processed by a script, but this might not be the format that you'd like your users to see.

The <data> tag enables you to overcome this by providing two numbers, one for the users (provided within the <data></data> tags) and one for the script (provided in the value attribute). This could look something like <data value="1">One</data>.


<!DOCTYPE html>
    <title>HTML5 Data Tag</title>
    <p><b>HTML5 Data Tags</b></p>
            <li><data value="123456">HTML5 Sample Data Tag</data></li>
            <li><data value="234567">HTML5 Sample Data Tag 2</data></li>
            <li><data value="345678">HTML5 Sample Data Tag 3</data></li>


HTML5 Data Tag

HTML5 Data Tags

  • HTML5 Sample Data Tag
  • HTML5 Sample Data Tag 2
  • HTML5 Sample Data Tag 3