CSS Tutorial
Menu
CSS Advanced
Menu
CSS Responsive
Menu
CSS Grid
Menu
Background Images
The background-image property defines an image that can be used as the background of an element.
The image is set to repeat, so it covers the entire element by default.
HTML
Hello World!
This page has an image as the background!
CSS
body {
background-image: url("nature.gif");
}
Output

The background image can also be used for specific elements, like the <p> element:
HTML
Hello World!
This text is not easy to read on this background image.
CSS
p {
background-image: url("bgset.jpg");
}
Output
