W3C says "The SCRIPT element places a script within a document. This element may appear any number of times in the HEAD or BODY of an HTML document."
Do have any thoughts on which is preferable?
placement of <script
-
- Rank V - Professional
- Posts: 367
- Joined: Fri Feb 17, 2006 5:22 am
- Location: Victoria BC Canada
-
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
Re: placement of <script
I think that may depend on what the scripts does, but in general it's probably best to place them right before the end "body" tag if you can, for performance reasons.
Here some more info:
http://stackoverflow.com/questions/4364 ... tml-markup
http://webdesign.about.com/od/speed/a/s ... -speed.htm
Here some more info:
http://stackoverflow.com/questions/4364 ... tml-markup
http://webdesign.about.com/od/speed/a/s ... -speed.htm
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial