The background property is a short-hand property to describe all the background properties for an element at once.
background: [ <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position> ] | inherit
0% 0%
All elements.
This property is not inherited.
set all the attributes
<p style="background : #ccc url(/library/graphics/purple.gif) repeat-y scroll center;">
This paragraph has the purple.gif image as a background that starts tiling in the center of the element and tiles only vertically. Where the image doesn't display has a grey background color.
</p>
- The background property only reliably works in the <body> tag in many browsers.
- If you write background: none; no background image or color will be used.

