Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is data-icon in html5?

Tags:

html

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.

like image 925
Lucka Avatar asked Jan 21 '11 03:01

Lucka


People also ask

What is a data attribute in HTML?

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.

What is data in CSS?

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.

What are icon fonts CSS?

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.


2 Answers

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.

like image 27
Puyol Avatar answered Oct 08 '22 04:10

Puyol


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.

like image 112
deceze Avatar answered Oct 08 '22 04:10

deceze