attach a javascript file to html using script tag code example Example: import js in html <script type="text/javascript" src="yourfile.js"></script>