HTML5 data attributes are custom attributes that can be added to HTML elements to store additional information. They are prefixed with "data-" and can be used to store data that is not visible to the user, but can be accessed by scripts and CSS.
Here is an example of how to use HTML5 data attributes:
In this example, the "data-info" attribute has been added to the div element with a value of "some information". This data can be accessed using JavaScript, for example:
CSS can also use data attributes to style elements with specific data values. For example:
This CSS rule would apply a yellow background color to any div element with a "data-info" attribute equal to "some information".