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.
The data-* attribute is used to store custom data private to the page or application. The data-* attribute gives us the ability to embed custom data attributes on all HTML elements.
CSS data types define typical values (including keywords and units) accepted by CSS properties and functions. They are a special kind of component value type. The most commonly-used types are defined in the CSS Values and Units specification.
Icon fonts are fonts that contain symbols and glyphs instead of letters or numbers. They're popular for web designers since you can style them with CSS the same way as regular text. Also, since they're vector's they're easily scale-able.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With