Ask any question about HTML here... and get an instant response.
How can I make an image responsive without using CSS?
Asked on Nov 05, 2025
Answer
To make an image responsive using only HTML, you can utilize the
<img> tag's width and height attributes set to percentages. This method allows the image to scale according to its container.
<!-- BEGIN COPY / PASTE -->
<img src="image.jpg" alt="Description of image" style="width: 100%; height: auto;">
<!-- END COPY / PASTE -->Additional Comment:
- The
styleattribute is used here to apply inline styles directly to the<img>tag. - Setting
widthto100%ensures the image fills the width of its container. - The
height: auto;maintains the aspect ratio of the image.
✅ Answered with HTML best practices.
Recommended Links:
