<script> tag - In <head> or <body> ? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita

<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 Respuestas
+ 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