Consider this example:
alert("Welcome to my world!!!");
By entering the alert command between the
If we had not entered the <script> tags, the browser would simply recognize it as pure text, and just write it on the screen.
In general however, it is advisable to keep as much as possible in the <head> section.