CSS image as the background of a page Code For Website - Learn About Website | DaddyFile

0

Background Image Explain

The background-image property specifies an image to use as the background of an element.
By default, the image is repeated so it covers the entire element.
The background image for a page can be set like this.



Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
body {
    background-image: url("paper.gif");
}
</style>
</head>
<body>

<h1>Hello World!</h1>

<p>This page has an image as the background!</p>

</body>
</html>




Html Code Result:


Post a Comment

 
Top