Here's a puzzling question for you: why does console.log(document.body) and console.log(document.head) work perfectly fine, but console.log(document.script) or console.log(document.html) don't seem to do anything? It's strange because all of these elements are within the document.
In Q2), it is possible to write:
document.getElementById('something')
However, why can't we write:
document.body.getElementById('something')
Even though the body element is part of the document and the desired element is within the body tag. Sometimes, document.body works at various points in the script execution.