Custom Data Attributes in HTML 5

Jul 13

Custom Data Attributes in HTML 5

HTML 5 data- Attributes: HTML and XML begin to merge.

Simply, the specification for custom data attributes states that any attribute that starts with “data-” will be treated as a storage area for private data (private in the sense that the end user can’t see it - it doesn’t affect layout or presentation).

So, you could have:

<div data-firstname="Deane" data-lastname="Barker>

Of course, you can do this now. You’ll just validate in HTML 5.



Comments are Closed

Thanks to all who participated.

Want to advertise on this site? Contact FM.