3 ms·
data-* is an HTML5 attribute: http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data-with-the-data-attributes http://dev.w3.org/html5/spec
by DougWebb 15y ago
data-* is an HTML5 attribute: http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data-with-the-data-attributes http://dev.w3.org/html5/spec/Overview.html#embedding-custom-...
The standard says that specific data-* attributes are only intended to be used by the site that generates the markup, but I think it's fair to say that an API using them can give semantic meaning to them for the use by any code using the API, without violating the standard.
- icebraining 15y agoSure, and the same can be done in JSON.