0
How to make HTML display before JS?
I want HTML like the header tag to load before JS how do I do that without making it all in one page?
6 Answers
+ 5
Just put JS before closing body tag.
+ 2
you have to put your external js import at the end of body...
not:
<script></script>
nor:
<script>/* your source code */</script>
but:
<script src="path/to/your/file.js"></script>
+ 1
Ok, although I asked not on the same page.
0
Place the <script></script> tag just before the body closing tag
0
I did I placed empty <script> tags at the bottom of the body tag and behind it, but JS still loaded before HTML, so my header was under my JS.
0
If I do it the inline way, which my JS would inside my <script> at the bottom of the <body> tag inside the HTML tag, it does fix the problem, albeit I would like to know how to do it while each language would be in its tab.