User 2726830 Photo

Registered User
3 posts

I would like to known all the details about attributes I can add to an element. I can see many possibilities of adding attributes like "Data Href", "Data Html", "Data Target", "Data Position", and so on... Any clues where I can have an explanation about that, how to use it with details ? I searched in the forum, nothing. Thanks !
User 2885740 Photo

Registered User
18 posts

Hi Nico,

data-attributes are custom attributes you can add to any HTML Element. To read more about what they are, you could start here: … tes/data-*
and here:

The Data-attributes you mentioned are all part of the Materialize framework. They are defined by the makers of that framework. It is not easy to learn how to use them, because they are not documented well.
An Example? When you have a picture element with the class “materialboxed” added to it, you could use the data-attribute “data-caption” – as described here, under paragraph “Captions”:
When you give an element the class “materialboxed” an eventhandler is added to it. Now, when you click on the picture the correct piece of javascript is called to blend in the value of the “data-caption”.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.