SubhanUllah Posted October 18, 2022 Report Posted October 18, 2022 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .responsive { width: 100%; height: auto; } </style> </head> <body> <h2>Responsive Images</h2> <p>If you want the image to scale both up and down on responsiveness, set the CSS width property to 100% and height to auto.</p> <p>Resize the browser window to see the effect.</p> <img src="img_nature.jpg" alt="Nature" class="responsive" width="600" height="400"> </body> </html>
administrator Posted October 18, 2022 Report Posted October 18, 2022 I cover that in my HTML5 course and in my book: Web Design Start Here. My HTML5 course: https://school.studioweb.com/store/course/html5_pro
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now