This is described in HTML5 CR, in the section on the script
element. In the example case, since neither the defer
nor the async
attribute is used, the browser will fetch (with a GET request) and execute the script before continuing the processing of the HTML document. The default handling is thus synchronous blocking behavior.
However, if you really use markup like <script src="http://...example.js"/>
without an end tag </script>
, the script is not fetched at all, except in the rare case where you serve the HTML document with an XML content type. The reason is that <script src="http://...example.js"/>
is parsed as a start tag only, so all the rest is parsed as content of a script
element, and when no end tag is parsed, the script
element is not completed. So don’t try to use “self-closing” syntax; instead, write <script src="http://...example.js"></script>
.