CSS's background attribute allows you to change the colour of any element's background (what paints underneath the content in that element). It's a shorthand property, which means you can write what would otherwise be numerous CSS properties in only one.
CSS has various attributes for decorating an element's backdrop, such as colouring the background, inserting images in the background and regulating their placement, and so on. Background-color, background-image, background-repeat, background-attachment, and background-position are the background properties.
The background-size attribute allows us to adjust the width and height of our image to fit the screen. We can instruct the browser where to put the image on the screen by using background-position.
CSS shorthand properties allow you to set the values of numerous other CSS properties at the same time. You can save time and energy by writing more brief (and frequently more readable) style sheets by using a shorthand attribute.
CSS attributes allow authors to specify an element's foreground and background colours. Colors or images can be used as backgrounds. Authors can use background attributes to position a background picture, repeat it, and specify whether it should be fixed to the viewport or scrolled with the document.