Style Object
The backgroundImage property sets or returns the background image of an element.
Set the backgroundImage property:
Return the backgroundImage property:
| Value | Description |
|---|---|
| url('URL') | The location of the image file |
| none | No background image. This is default |
| inherit | The setting of the background-image property is inherited from the parent element |
![]()
The backgroundImage property is supported in all major browsers.
Note: The value "inherit" is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports "inherit".
Tip: In addition to the background-image you should also specify a background-color. The background-color will be used if the image is unavailable.
Set a background image:
Style Object
Your message has been sent to W3Schools.