how to put image in background in html using css code example
Example 1: css background image
background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
Example 2: how to add a background image in html
<!-- HTML -->
<div id="imageDiv"></div>
<!-- CSS -->
<style>
#imageDiv {
background-image: url('someimage.png');
}
</style>
Example 3: background css image
background-image: url('./image.jpg');