The background property is a shorthand property for setting all background properties in one declaration.


body {background: #FF0000}

body {background: url(stars.gif) no-repeat top}

body {background: #00FF00 url(stars.gif) no-repeat fixed top}

This shorthand property allows to declare all background properties in one single declaration line.

The following, are the properties that can be set using the background shorthand property: background-color, background-position, background-size, background-repeat, background-origin, background-clip, background-attachment, and background-image.