title: Does the <script> tag position in HTML affects performance of the webpage?
body: <p>If the script tag is above or below the body in a HTML page, does it matter for the performance of a website?</p>
  
  <p>And what if used in between like this:</p>
  
  <pre><code>&lt;body&gt;
  ..blah..blah..
  &lt;script language="JavaScript" src="JS_File_100_KiloBytes"&gt;
  function f1() {
  .. some logic reqd. for manipulating contents in a webpage
  }
  &lt;/script&gt;
  ... some text here too ...
  &lt;/body&gt; 
  </code></pre>
  
  <p>Or is this better?:</p>
  
  <pre><code>&lt;script language="JavaScript" src="JS_File_100_KiloBytes"&gt;
  function f1() {
  .. some logic reqd. for manipulating contents in a webpage
  }
  &lt;/script&gt;
  &lt;body&gt;
  ..blah..blah..
  ..call above functions on some events like onclick,onfocus,etc..
  &lt;/body&gt; 
  </code></pre>
  
  <p>Or this one?:</p>
  
  <pre><code>  &lt;body&gt;
      ..blah..blah..
      ..call above functions on some events like onclick,onfocus,etc..
  &lt;script language="JavaScript" src="JS_File_100_KiloBytes"&gt;
      function f1() {
      .. some logic reqd. for manipulating contents in a webpage
      }
      &lt;/script&gt;
      &lt;/body&gt; 
  </code></pre>
  
  <p>Need not tell everything is again in the <code>&lt;html&gt;</code> tag!!</p>
  
  <p>How does it affect performance of webpage while loading? Does it really?
  Which one is the best, either out of these 3 or some other which you know? </p>
  
  <p>And one more thing, I googled a bit on this, from which I went here: <a href="https://developer.yahoo.com/performance/rules.html">Best Practices for Speeding Up Your Web Site</a> and it suggests <a href="https://developer.yahoo.com/blogs/ydn/high-performance-sites-rule-6-move-scripts-bottom-7200.html">put scripts at the bottom</a>, but traditionally many people put it in <code>&lt;head&gt;</code> tag which is above the <code>&lt;body&gt;</code> tag. I know it's NOT a rule but many prefer it that way. If you don't believe it, just <em>view source</em> of this page! And tell me what's the better style for best performance.</p>