<!doctype html> <html> <head> <title>This is a document</title> <script src="js/script.js"></script> <script> /* code goes here */ </script> </head> <body onload="badPlaceToPutJSButAllowed();"> <script> // also allowed here </script> <script src="js/script2.js"></script> </body> </html>