Possible Duplicate:
HTML5 <script> declarations
I’ve heard a few people say that you don’t need to specify a type="text/javascript" in a <script> tag, as this is the default type.
Is there any downside if I open my script tags as <script> instead of the more verbose <script type="text/javascript">?
In HTML4 the
typeattribute is required:http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.1
In HTML5 it is not.
http://dev.w3.org/html5/markup/script.html
If you are going to use HTML4, then good practice certainly includes adhering to its specifications. If you’re using HTML5, then it’s pretty clear that
<script>without atypeistext/javascript, so you can safely omit it.