Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Responsive Images</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> <style> /* Custom CSS to beautify this example */ .box{ width: 400px; border: 5px solid #000; } </style> </head> <body> <div class="m-4"> <h2>Non-Responsive Image</h2> <div class="box"> <img src="/examples/images/sky.jpg" alt="Cloudy Sky"> </div> <hr> <h2>Responsive Image</h2> <div class="box"> <img src="/examples/images/sky.jpg" class="img-fluid" alt="Cloudy Sky"> </div> </div> </body> </html>