Hi,
There is yes.
Your Joomla template already add the head and body tags around the code of the modules and main content on the page. So if you add these tags in your module, you'll end up with invalid HTML on the page. While the page might still display as the browsers are quite arranging with wrong HTML, it doesn't change the fact that it is invalid.
As I explained in my message, you can do this in a module, but you should use the Joomla functions to push the javascript to the head of the page.