I was trying to use percentage to shrink this img’s both width and height by half and it seems to affect width only. Could anybody tell me why it is not working as I intend?
Thanks in advance.
By using percentage dimensions in style you are setting the width and height with respect to the size of parent container <body> in this case. So in your code the width and height of img becomes 50% of the display preview container in browser which can be observed by changing width of the preview window.
The challenge requires you to halve the size of img using px values, see hint of challenge.
You are right. The challenge requires me to halve the size of img using px values but I was just curious why percentage would not work.
Thank you for the explanation, uma1r!