+ 2

Script tags location

what is the difference between placing script tag in head tag and placing script tag in body tag?

1st Apr 2017, 11:45 PM
Beny Saberi
Beny Saberi - avatar
1 Respuesta
0
The page is loaded in the order you coded it, so if you try to access an element before it is loaded some functions like document.getElementById will return null. https://code.sololearn.com/WHDYWt08ooO2/?ref=app
2nd Apr 2017, 1:56 AM
Luca Garrera