HTML5

Is it still necessary (or even good practice) when using HTML5 to declare the script type when using a script block?

e.g. <script type=”text/javascript”>

Plus what about using a CDATA block in the script for browser parsing?

e.g. // <![CDATA[ … ~code here ~… // ]]>

Any help much appreciated.

HTML5 localStorage

what could be the real practical use of HTML5 localStorage?

HTML5 validation

I wonder if HTML5 have any formvalidation for dual entry (write 2 identical password) and can you write own exceptions? Thanx in advance!

html5 website showcase?

websites similar to bentheboydguard.com or the latest NIKE html5 website? which websites lists all the latest well disgned html5 websites?

HTML5 technologies

I actually want to learn something about HTML5 and read a lot about it. What I donĀ“t understand is that I can never find a list of technologies that HTML5 is based on. Can you tell me which technolog

Mobile HTML5 testing

Can you recommend resources for testing mobile phones against HTML5? I know some resources for testing HTML5: http://www.rng.io/ Ring Mark from FaceBook. http://html5test.com/ from NielsLeenheer (h

html5 spellcheck

How does the html5 spellcheck attribute work? I am seeing this page with Chrome 17, which is supposed to support spellcheck on <textarea>, (but not on <input type=’text’>), but when I type

html5 framerate

I was thinking of making a game using javascript for the game logic and the HTML5 canvas element to animate the drawing. My goal is to write something that works in browsers and on newer smartphones.

HTML5 peertopeerconnection()

Am I right in thinking that the HTML5 peertopeerconnection() for enabling peer to peer communication between different computers browsing the same site has been dropped from the latest draft and has n

HTML5 pathfinding

Is it possible to create a pathfinding feature using HTML5 only. I am looking for something very simple like connecting two points (not in a straight line) with dotted line. The ultimate result will b

HTML5 Oscilloscope

I need a free real-time chart (preferably HTML5) which can plot incoming signals like an oscilloscope. I found two examples which are very close to what I want: http://flotcharts.org/ http://smoothie

Answers

The current draft of HTML5 doesn’t require the type attribute for script tags.

Also the <![CDATA is not required in HTML5 (it was XHTML specific anyway).

The CDATA comments are for XML, so only applicable if you’re serving your pages up as xml (which you shouldn’t be if it’s HTML5).

As for the type attribute, it’s optional now in HTML5.

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).