Learn Responsive Images Using the max-width Property – HTML Code
Notice that in the example above, the image can be scaled up to be larger than its original size. A better solution, in many cases, will be to use the
max-width property instead.
Using the max-width Property
max-width property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size:
<img src="img_girl.jpg" style="max-width:100%;height:auto;">
Try Your Self ->