Background - Shorthand Property

As you probably understand by now, there are many properties to consider when dealing with backgrounds. To shorten the code, it is also possible to specify all the properties in one single property. This is called a shorthand property. The shorthand property for background is simply "background":

body { background: #ffffff url(path to imagefile) no-repeat right top; }

When using the shorthand property the order of the property values is:

It does not matter if one of the property values is missing, as long as the ones that are present are in this order.

Back button Table of Contents Next button