Answers for "placement of script tag in html"

10

how to add script in html head

<script src="script.js" defer></script>

<!--just add defer attribute so script will execute at last-->
Posted by: Guest on August-21-2020
1

where is the correct place to insert a javascript

You can place any script in the <body>, or in the <head> section.
Posted by: Guest on July-02-2020

Browse Popular Code Answers by Language