Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <body> <h2>Responsive Image</h2> <p>Styling an image with "max-width:100%" prevents the image from getting bigger than its original size.</p> <p>However, if you make the browser window smaller, the image will still scale down.</p> <p>Resize the browser window to see the effect.</p> <img src="img_girl.jpg" style="max-width:100%;height:auto"> </body> </html>