Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

background

Definition

The background property is a shorthand method for setting background-color, background-image, background-repeat, background-attachment and background-position.

Example

  1. body {background: white url('/images/sun.gif') repeat fixed top center}

This is equivalent to:

  1. body {
  2. background-color: white;
  3. background-image: url('/images/sun.gif');
  4. background-repeat: repeat;
  5. background-attachment: fixed;
  6. background-position: top center;
  7. }

Characteristics

Possible values

Default value

See individual properties

Applies to

Inherited

No

See also