Lucka
Lucka

Reputation: 343

what is data-icon in html5?

What is "data-icon" in HTML5 and how can I use it? If you know any source where I can read more about it, please let me know. Thanks.

Upvotes: 18

Views: 33467

Answers (2)

deceze
deceze

Reputation: 522342

data- attributes are attributes for private use. I.e., anybody can make up any data- attribute and do with it whatever he wants. I suppose you came across this as part of jQuery mobile's markup for icons on buttons.

Upvotes: 24

Puyol
Puyol

Reputation: 3109

Have a look at this:
http://pictos.cc/server/

Data-icons are a way to add a background image to an element using fonts. The great benefits are that those images can be scaled and colored without loss of resolution.

Upvotes: 6

Related Questions