w3resource logo


CSS tutorials

CSS background properties

Secondary Nav

CSS background properties specify how to set styles (like set an image, set color etc.) for the background of an HTML element or an HTML web-page.

List CSS background properties

  • CSS background-color property sets a background color of an HTML element or an entire HTML page
  • CSS background-image property sets an image in the background of an HTML element or an entire HTML page
  • CSS background-repeat property repeats an image in the background of an HTML element or an entire HTML page, either in the horizontal or in the vertical direction.
  • CSS background-attachment property specifies whether an image in the background of an HTML element or an entire HTML page, is fixed or scrolls along with the viewable area.
  • CSS background-position property specifies the initial position of an image in the background of an HTML element or an entire HTML page.
  • CSS background-position property specifies the initial position of an image in the background of an HTML element or an entire HTML page.
  • CSS background property can be used to set all the properties mentioned above with a single property. This kind of a use is referred as CSS shorthand property.

In the next page, we have discussed CSS background-color property.



Join our Question Answer community to learn and share your programming knowledge.

Solve these problems:

Java: How to convert a string to an integer in Java?

C#: Loops in c#

SQL: JOIN using more than 5 tables