Procent wysokości HTML nie działa

<!--a child element inherits height/width from parent element
so defined height in parent to be able to take a percentage in child-->
<!--ex:-->
body {height: 500px}
div {height: 50%}
Precious Porpoise