Background image property sets background image to the HTML element.
body
{
background-image:url("Nature-picture1.jpg");
}
Example: Set background image to the HTML body element.
<!DOCTYPE HTML>
<html>
<head>
<title> CSS Background Image</title>
<style type="text/css">
.bckgrndColor {
background-color:Yellow;
color:Black;
}
body {
background-image:url("Nature-picture1.jpg");
color:White;
}
</style>
</head>
<body>
<h1>Zap Food and Gas</h1>
<h2>138 First Street, CA 94539</h2>
<hr>
<h3 class="bckgrndColor">Our Mission:-</h3>
<p >The mission of Zap Food and Gas is to offer great food and competitive gas price.</p>
<h3 class="bckgrndColor">Our Commitment:-</h3>
<p>Our commitment to serving you as our customer is at the heart of everything we do.
It is our purpose to serve you as our customer with the highest-quality foodservice
products and other services.</p>
</body>
</html>
Result: