The type of script you run determines where you put the script. If a script is triggered by a link to "rollover" an image or show a message in the status bar, then the script goes with the link.
Most scripts are put in between the <head> and </head> tags. Some tags, however, will have some script in the head section (to calculate a date, for example) and then include some script in the body section to write what is calculated. If you have a script like this, with some functions in the head and others in the body, be sure that in each place you begin with <script> and end with </script>. However, that is not true if the script in the body is part of a link inside the <a href> tag.
Return to Topic 14 Introduction