xxxxxxxxxx
<html>
<head>
body{
background-image : url('Resources/VS7.png');
<!--To cover whole screen-->
background-size : cover;
<!--To set no repeat-->
background-repeat : no-repeat;
}
</head>
<body>
</body>
</html>
xxxxxxxxxx
<style>
body {
background-image: url('img.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
xxxxxxxxxx
<!-- Background image -->
<div class="bg-image" style="
background-image: url('https://mdbootstrap.com/img/new/standard/city/041.jpg');
height: 100vh;
"></div>
<!-- Background image -->
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("path/to/image.jpg");
background-repeat: no-repeat;
background-size: cover;
}
</style>
</head>
<body>
</body>
</html>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('path/to/image.jpg');
background-size: cover;
/* Add other CSS properties for the background here */
}
</style>
</head>
<body>
<!-- Your HTML content goes here -->
</body>
</html>
xxxxxxxxxx
<!-- Add image by a HTML element: -->
<div style="background-image: url('img.jpg');">
<!-- Add image by a <style> element: -->
<style>
div { background-image: url('img.jpg'); }
</style>
<!-- Add to the entire body: -->
<style>
body { background-image: url('img.jpg'); }
</style>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<head>
<style>
p {
background-image: url('img_girl.jpg');
}
</style>
</head>
<body>
<h2>Background Image</h2>
<p>You can specify background images<br>
for any visible HTML element.<br>
In this example, the background image<br>
is specified for a div element.<br>
By default, the background-image<br>
will repeat itself in the direction(s)<br>
where it is smaller than the element<br>
where it is specified. (Try resizing the<br>
browser window to see how the<br>
background image behaves.</p>
<h2>Background Image</h2>
<p>A background image for a p element:</p>
<p style="background-image: url('img_girl.jpg');">
You can specify background images<br>
for any visible HTML element.<br>
In this example, the background image<br>
is specified for a p element.<br>
By default, the background-image<br>
will repeat itself in the direction(s)<br>
where it is smaller than the element<br>
where it is specified. (Try resizing the<br>
browser window to see how the<br>
background image behaves.
</p>
</body>
</html>