<script> tag - In <head> or <body> ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis

<script> tag - In <head> or <body> ?

Which one is better, adding script tag within the head section or the body?

15th Jul 2018, 9:23 AM
2 Respostas
+ 1
At the top of end body tag. Because its wait untill your html and css is rendered. Thus making nice user interface. Hope thid helps‚ėļÔłŹ‚ėļÔłŹ.
15th Jul 2018, 9:35 AM
Meet Mehta
Meet Mehta - avatar
+ 1
It depends. But this has been asked before. https://www.sololearn.com/discuss/1363615/?ref=app
15th Jul 2018, 9:41 AM
Janning‚≠ź - avatar