jquery - why do we need prefix "data" for custom data attributes in html5 -
is there reason use data-attribute custom data attributes on html5 elements? remember using custom data attributes without using data prefix , think did work alright.
can please correct me.
abridged version of the answer @lachlan hunt duplicate question:
- it guarantees there not clashes extensions html in future editions.
- more convenient dom api accessing these attributes scripts.
- they provide clear indication of attributes custom attributes, , ones standardised attributes.
Comments
Post a Comment