Consider the two HTMLs
[1]:
<div style="height:100%">
<div style="height:50%">
<img src=test.jpg style="height:200%; width:100%" />
</div>
</div>
[2]:
<div>
<div>
<img src=test.jpg style="width:100%" />
</div>
</div>
Screenshot for chrome: https://i.stack.imgur.com/nvCXr.jpg
JSFiddle link (thanks to Sujay): http://jsfiddle.net/H8ZNc/show/light/
As far as I understand, in [1], the img tag looks to resolve height from its parent. That parent is also specified in percentage (50%) so it should again go up until it finds that there is no non percentage height specified. So it should ignore all heights and behave like [2].
I saw the question Percentage Height HTML 5/CSS where @bobince has mentioned "Whilst that height can also be a percentage if you want, that just moves the problem up to the next level." I wanted to know what really happens here.
It is also interesting to note that in Firefox, both the HTMLs render like [2] is rendered in Chrome.