Tag: HTML5

My new best CSS friend – content: attr(data);

How to use the data attribute in CSS content

June 27th 2013 - Code

tooltip

I have been experimenting with the CSS content property quite a bit lately. What I discovered is you can populate it with the HTML data attribute.

For example say we wanted an item to have a tooltip. We would write out the HTML like this…..