<data> tag

HTML5 <data> tag

This <data> tag sets machine readable values for the given contents.

If you wish to have the contents in an alternative format, then you can use this tag.

Suppose, you wish to have 2 formats for your content –

  1. Machine-readable format –  For machine to process your content
  2. Human-readable format  – For your readers to read.

In this case, it is best to use the <data> tag.

<data value=”numbers”>text..</data>


    <data value="1">Long grain</data>
    <data value="2">Brown Long Grain Rice</data>
    <data value="3">Basmati Rice</data>
    <data value="3">Jasmine Rice</data>

Default CSS Value


How Browser will display


Difference between HTML4.01, XHTML and HTML5

NA NA New tag in HTML5

Attributes used with <data> tag

Attribute Description
value This is a mandatory attribute. This defines a machine-readable format of the content

Do not use the time-related or date-related content using the <data> tag. For this purpose, you should use the <time> tag.

Global Attributes

The <data>  tag supports Global attributes.

Event Attributes

The <data>  tag supports Event attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

<li>, <ul>, <ol> tags

Tutorials for all brains!