Construct a HTML document with CSS to set an image as the background of a page.
Input
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("nature.jpg");
background-repeat: no-repeat;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>This page has an
<br>image as the
<br>background!</p>
</body>
</html>
Input
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("nature.jpg");
background-repeat: no-repeat;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>This page has an
<br>image as the
<br>background!</p>
</body>
</html>
Output
No comments:
Post a Comment