Hello Devs, 

In this tutorial, we will learn CSS Background

The CSS background property is used to define the background effect of an HTML element. There is 5 CSS background property that used to change the background property.

  • background-color
  • background-image
  • background-repeat
  • background-attachment
  • background-position

CSS background-color

It is used to change the bg color of the HTML element

CSS background-image

It is used to add bg image to an HTML element

CSS background-repeat

Some images are repeated only horizontally or vertically.

CSS background-attachment

It is used to define that if the bg image is fixed or scroll with the rest of the page in the browser window.

CSS background-position

It is used to specify the initial position of the background image.

CSS Border

It is used to set a border for an HTML element.