Script Location within HTML | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Script Location within HTML

In this example, the script is located in the head. Would this cause functionality issues since itā€™s not located at the end of the body? With the way itā€™s set up now, my understanding is that elements on the page wonā€™t be loaded before the script is run.

9th Dec 2017, 3:38 PM
CĆ©leste Robinson
CĆ©leste Robinson - avatar
1 Resposta
+ 6
Well, if the script loads before the document, if it involves getting some elements, then yes. Else, no.
9th Dec 2017, 3:40 PM
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬ - avatar