goes in the head section. When you place a script in the head section, you will ensure that the script is loaded before anyone uses it. <head> <script language="JavaScript"> some statements </script> </head> you place a script in the body section it generates the content of the page. <head> </head> <body> <script language="JavaScript"> some statements </script> </body> document, so you can have scripts in both the body and the head section. <head> <script language="JavaScript"> some statements </script> </head> <body> <script language="JavaScript"> some statements </script> </body> every page. To simplify this you can write the script in a external file, and save it with a .js file extension. Like this: -The filename can not contain more than 8 letters -The external script can not contain the <script> tag <head> </head> |