JavaScript Loading Order

The HTML paragraph element is written on the web page before the dynamic content from the script. That is because the script tag is after the paragraph tag. If you move the HTML script element to the "head" tag you will see the dynamic text is written first!

Other examples in Scripts (Advanced HTML)
Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 4.0