how to connect a javascript file to html
snippet in html

link js file

user1441


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

how to add script in html head

user9614

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

<!--just add defer attribute so script will execute at last-->

how to connect a javascript file to html

user5359

<script src="name.js">
	//put in your javascript here
</script>