<script> element. When a web browser comes across this element, the Web browser knows that the scripting engine must interpret the commands within the element. The type attribute of the script element tells the browser which scripting language and which version of the scripting language is being used.
For example, you assign a value of
Where do I place these scripts?
There is no limit to the number of scripts you can have in your web document. Scripts can be located within head and body elements, even at the same time.
However, if possible you should place all of your scripts in the head section, just before the closing head tag. If you place scripts within the body section, the scripts should be placed at the very bottom, just before the closing body tag.
.js. To reference an external script, simply point to the
.js file in the
src attribute within the
<script> element. Here is an example: