Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .container { position: relative; font-family: Arial; } .text-block { position: absolute; bottom: 20px; right: 20px; background-color: black; color: white; padding-left: 20px; padding-right: 20px; } </style> </head> <body> <h2>Image Text Blocks</h2> <p>How to place text blocks over an image:</p> <div class="container"> <img src="img_nature_wide.jpg" alt="Nature" style="width:100%;"> <div class="text-block"> <h4>Nature</h4> <p>What a beautiful sunrise</p> </div> </div> </body> </html>