<script src="myExternalFile.js"></script> where myExternalFile.js is the location of the external file.
Placement of the
<head> but this is not a requirement. You can also place the link within the document
However, there may be times when placing it in the
You can also use the
Again, this doesn't necessarily need to be in the
<head> element — it could be located anywhere within the HTML document.
You can use the
type attribute to explicitly state the type of script.