
By using background-image
property we can set a background image for the HTML <body>
element.
<style> body { background-image: url("Background-Website3.jpg"); } p { color: yellow; } </style> <body> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> <p>I am an INDIAN</p> </body>
In the above code snippet we have given background-image
property to the <body>
element, so that it sets the background image to the total <body>
element.
OUTPUT