how to put background picture in html code example
Example 1: how to set background image in html
<div style="background-image: url('img.jpg');">
<style>
div {
background-image: url('img.jpg');
}
</style>
<style>
body {
background-image: url('img.jpg');
}
</style>
Example 2: how to add a background image in html
<div id="imageDiv"></div>
<style>
#imageDiv {
background-image: url('someimage.png');
}
</style>
Example 3: how to make a picture your background on html
<html>
<body>
<h2>Background Image</h2>
<div style="background-image: url('img_girl.jpg');">