Why are javascript <script> tags placed in the <body> rather than the other script tags which are usually placed in the <head>?
<script> element after the elements it needs to access is one way to achieve this.The introduction of the defer attribute allows both these benefits to be gained while leaving the <script> element in the <head> which also allows the HTTP request for the JS to run in parallel. Not everybody has caught up with this development.