+ 1
I am getting onfused... where to write the scripts.... either in body tag or in head tag.... plz answer dis
5 Réponses
+ 6
you can write them in both.
At end of the body, or the head.
+ 3
Anywhere in your Html file, since it's in <script></script> tags ( or <script src="external.js"> )...
Actually, recommend practice tend to be at end of body, when in past it was recommended to put it in the head ^^
0
if you want to show something quick on display through JavaScript then used in <body> Tag and if you want to used for validation then used in <Head> tag.or external link.
0
u can write them in both...but most favourable is to write in head tag