Im trying to learn some key concepts of DOM traversal using vanilla javascript and just generally trying to get my head around some basic concepts ive mostly skipped... There are a few concepts I am not quite understanding.
if we take a simple HTML page:
<html>
<head>
<title>hello</title>
</head>
</html>
to my way of thinking I should be able to retrieve the string "hello" using the following:
window.document.head.title.innerHTML;
However this just returns an empty string. Can anyone explain why?