calling javascript file in html

JavaScript
<html>
  <head>
    <script type="text/javascript" src="/path/to/script.js"></script>
    ...<script type="text/javascript" src="yourfile.js"></script>
Source

Also in JavaScript: