CSS — Backgrounds
CSS allows you to style the background of an element in many ways. You can add solid colors, gradient effects, or images. Background images can be set to repeat, stretch, or cover the entire element. For example, a website header might have a full-width image while a button might just have a simple color. Gradients are a smooth blend between two or more colors and can make designs more attractive. By combining different background techniques, you can create visually engaging designs.
body { background-image: url('photo.jpg'); }
.box { background: linear-gradient(orange, yellow); }