Импорт JS в HTML
<script type="text/javascript" src="yourfile.js"></script>
SteDeus
<script type="text/javascript" src="yourfile.js"></script>
<script type="text/javascript" src="path-to-javascript-file.js"></script>
<script src="script.js" defer></script>
<!--just add defer attribute so script will execute at last-->
<body>
<script type="module" src="script.js"></script>
</body>