Date: 2014jan16
Update: 2025oct21
Language: javaScript
Keywords: statement
Q. javaScript: Best way to declare javaScript code in an html file?
A. The current way is just:
<script>
... your code goes here ...
</script>
Previously it was like this:
<script type="text/javascript"> // WRONG
... your code goes here ...
</script>
Before that it was like this:
<script language="javascript"> // WRONG
... your code goes here ...
</script>
Its doesn't really matter if its inside <head>.
Some HTML checkers will complain, however.