Script Location within HTML | SoloLearn: Learn to code for FREE!


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.

12/9/2017 3:38:47 PM

Céleste Robinson

1 Answer

New Answer


Well, if the script loads before the document, if it involves getting some elements, then yes. Else, no.