Web development · The DOM and events
A script can only find what the browser has already read, so where the script tag sits decides what it sees.