1background-image: url("image.png");
2background-position: center;
3background-repeat: no-repeat;
4background-size: cover;
1<!-- Add image by a HTML element: -->
2<div style="background-image: url('img.jpg');">
3
4<!-- Add image by a <style> element: -->
5<style>
6div {
7 background-image: url('img.jpg');
8}
9</style>
10
11<!-- Add to the entire body: -->
12<style>
13body {
14 background-image: url('img.jpg');
15}
16</style>
1<style>
2body {
3 background-image: url('img_girl.jpg');
4 background-repeat: no-repeat;
5 background-attachment: fixed;
6 background-size: cover;
7}
8</style>
1<!-- Code by Scratchy -->
2<!-- Twitter: @S_cratchy-->
3
4<head>
5 <style>
6 body {
7 background-image: url(https://wallup.net/wp-content/uploads/2019/09/110394-cats-grey-kittens-fluffy-fat-grass-animals-cat-kitten-baby-cute-748x468.jpg)
8 }
9 </style>
10
11 <body>
12 You have set the background image!
13
14
15
16 </body>
1<!-- Background image -->
2<div class="bg-image" style="
3 background-image: url('https://mdbootstrap.com/img/new/standard/city/041.jpg');
4 height: 100vh;
5 "></div>
6<!-- Background image -->