W3Schools.com

CSS Reference

CSS Reference
CSS Selectors
CSS Reference Aural
CSS Web Safe Fonts
CSS Units
CSS Colors
CSS Color Values
CSS Color Names
CSS Color HEX
CSS3 Browser Support

CSS Properties

CSS3 icon Property

CSS Reference Complete CSS Reference

Example

Style an img element with an iconic equivalent:

img
{
content:icon;
icon:url(imgicon.png);
}


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The icon property is not supported in any of the major browsers.


Definition and Usage

The icon property provides the author the ability to style an element with an iconic equivalent.

Note: An element's icon is not used unless the "content" property is set to the value "icon"!

Default value: auto
Inherited: no
Version: CSS3
JavaScript syntax: object.style.icon="url(image.png)"


Syntax

icon: auto|URL|inherit;

Value Description
auto Uses a default generic icon provided by the browser
URL Refers to one or more icons in a comma separated list
inherit Specifies that the value of the icon property should be inherited from the parent element


CSS Reference Complete CSS Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE