Is it still necessary (or even good practice) when using HTML5 to declare the script type when using a script block?
e.g.
Is it still necessary (or even good practice) when using HTML5 to declare the script type when using a script block?
HTML 5 defines text/javascript as the default, and you'd be hard pressed to find a browser that didn't treat it as such. So you can omit it.
Plus what about using a CDATA block in the script for browser parsing?
Pointless unless you are writing XHTML 5 and using characters such as <
or &
in the script (but you should almost always be using external scripts anyway).