Background

A background is a stack of layers: background-image takes a comma-separated list painted top-first over one background-color, and each longhand below takes one value per layer:

The shorthand writes a layer as image position / size repeat attachment origin clip, with the color in the last layer only. Omitted parts reset, so a later background: red wipes out an earlier background-image.

A hero banner with three background layersCSS
.hero {
  background:
    url("logo.svg") right 1rem bottom 1rem / 80px no-repeat,  /* top layer */
    linear-gradient(#0008, #0000 60%),                        /* darkening scrim */
    url("hero.avif") center / cover no-repeat #37474f;        /* photo + fallback color */
}

The scrim keeps white headlines readable over any photo; the color shows while the photo loads. The gallery in Gradients in Depth renders layered tiles, background-clip: text and a clipped gradient border.

Use <img> for meaningful images: backgrounds have no alt text and usually do not print.