Image In Html Width Height. Img src img girl jpg alt girl in a jacket width 500 height 600. If you set both to 100 the image will be stretched.

Always specify both the height and width attributes for images. Using this option limits the images that use that css. The max height property sets the maximum height of an element and the max width property sets the maximum width of an element.
100 the image will be displayed at 100 of the size of its container but no larger if the image is larger than its container the image will shrink to fit.
Example of auto resizing an image with the max width and max height properties. The width attribute specifies the width of an image in pixels. 100 the image will be displayed at 100 of the size of its container but no larger if the image is larger than its container the image will shrink to fit. If you set both to 100 the image will be stretched.