Example: Since the image is the background image of the div, therefore, the heading GeeksforGeeks appears over the image.
1.Create a Div Using CSS
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> div { background-image: url(b1.jpg); background-repeat: no-repeat; } img { visibility: hidden; } h1 { position: absolute; left: 35%; top: 30%; color: white; } p{ position: absolute; left: 35%; top: 40%; color: white; } </style> </head> <body> <div> <h1>Bajarangi Soft</h1> <p>Bajarangi Soft was founded in 2018 by two expert developers looking to expand their knowledge of code worldwide</p> <img src= "bg.jpg" alt="Image" /> </div> </body> </html>