CSS background-image property
The image background is largely popular for hero images on websites, image carousels, or article covers. To set an image for a background, we use the background-image
property. By default, the image takes the whole element's container, and if it's too small, the browser repeats or tiles the image. The property value should contain a url specifying the image location.
Pro Tip: Even if you specify the image for a background, set a background-color
property as a back-up in case the image won't load.