What are the attributes of data- * HTML?

I recently found the following on one of the opening site tags:

<script data-ip="93.1xx.3.2x" data-backuri="something.com">

And I could not find any information about this. What are those tags used for?

+4
source share
1 answer

data-* attributes are custom HTML attributes.

Basically, there are standard HTML attributes such as style, src, width, height, class... and they are of particular importance to browsers and are "reserved".

However, user attributes do not have special meaning at all and are only special to the owners application. They can be used to simplify application logic.

data- , , . , , sound. data-sound, , , . , data- .

. jquery get HTML 5 , data- *.

, . MDN docs .

+4

All Articles