Well, there are two cases (at least) depending on what you want to achieve. If you need functionality built into a script or scripts, such as function libraries, available before or during page loading, you must load the JavaScript code in the header tag. If you need to do something that requires some resources that will be available only after loading the page (the DOM resources that are), you should load script / s at the bottom of the page (this can also be solved using onDOMReady events that are already available in most JavaScript frameworks). There may be some performance issues that may dictate your decision. For example, there are situations when loading a script or scripts in the head tag slows down the rendering of pages, and if you can provide basic functions using a page,displayed until the script is fully operational, then again the script or scripts should be loaded from below. This is more or less a decision based on what you need to do.