Style an img element with an iconic equivalent:
![]()
The icon property is not supported in any of the major browsers.
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)" |
| 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 |
Your message has been sent to W3Schools.