Why we need add a auto value to the height property?

in this practice i dont understand why we must add

height: auto
to the CSS of images, even without it the image still responsive well and the fully show in different screens?

and also in don’t understand the use of
display: block;
for it (thats rule also was not create any change)

The height is automatically scaled to be proportional to the width. We cannot set height and width on inline elements (img is inline) so converting it to a block level element clears the way for those properties.

1 Like