Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCRIPT tag inside web page (HEAD vs BODY)

 
Manio Manegra
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I'd like to know if there is any difference placing your SCRIPT tag inside HEAD tag instead of putting into BODY tag.
I know that conceptually you should put your SCRIPT tag in the HTML header section if its code is about a deferred action, but the main point is: what is the difference in browser behavior in those two scenarios?

Anyone could help?

Bye Manio
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There really is no major difference that I am aware of.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic