The data- attribute
The data- attribute is used to create attributes with their own names. Such attributes are used to store various data in HTML markup.
How to create your own attributes: their names should start with data-, followed by a name of your own. Attributes created this way will be validated.
Example
Let's use the data- attribute to store the day, month, and year:
<span data-day="12" data-month="03" data-year="2015">text</span>
:
See also
-
lesson custom attributes,
about working withdata-attributes via JavaScript