Is there a limit on html's data-attribute? Is it possible to have many data-attributes on a tag?
ex. data-a="" data-b="" data-c="" ... data-z=""
And also is there a limit how long the value on each data-attribute?
Is there a limit on html's data-attribute? Is it possible to have many data-attributes on a tag?
ex. data-a="" data-b="" data-c="" ... data-z=""
And also is there a limit how long the value on each data-attribute?
Every HTML element may have any number of custom data attributes specified, with any value.
Source: w3.org: 3.2.5.9 Embedding custom non-visible data with the data-* attributes
The limit of length has been discussed in a previous question linked by Mary Melody above: Is there a limit to the length of HTML attributes?
Far of my concern. Their is no max length when defining data attribute in JavaScript just remember to always use lowercase [-variable]
© 2022 - 2024 — McMap. All rights reserved.