CSS HTML Validator - The All-In-One HTML, XHTML, CSS, Link, SEO, and Accessibility Checker
Home Help: "background" CSS property

The "background" CSS Property


This shorthand property can set most background properties. Note that a color is permitted in <final-bg-layer>, but not in <bg-layer>.

Values for "background"
CSS LevelValue
CSS 2.1"['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position']"
CSS3"[ <bg-layer> , ]* <final-bg-layer>", where <bg-layer> is "<bg-image> || <position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>" and <final-bg-layer> is "<bg-image> || <position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box> || <background-color>"


  • Given a valid declaration, the 'background' property first sets all the individual background properties to their initial values, then assigns explicit values given in the declaration.

Recommended Links

Accessibility Information & Tips

  • Use CSS to include decorative images wherever possible. The CSS "background", "background-image", "content", and "list-style-image" properties can be used. This avoids additional markup in the content. Visit https://www.w3.org/TR/WCAG20-TECHS/C9 for more information.

Search Engine Links (for more information)

Help us improve this page: Suggest a link or noteReport a problem