Attributes are added to a tag to provide the browser with more information about how the tag should appear or behave. We can get the value of the data attribute using the dataset property or the getAttribute() method on the messageEl template reference variable.. HTML data attribute supports object element. How to Upload Image into Database and Display it using PHP ? Tha data attribute of the element sets the URL of the resource, which can be audio, video, pdf, flash, etc. Experience. How to update Node.js and NPM to next version ? The data-* attributes can be used to define our own custom data attributes. Due to compatibility issues, the