tags:

views:

401

answers:

5

I have seen HTML 5 coming up in near future. How does it differ from HTML 4, which has been 'in' for so many years in web development?

thanks

+4  A: 

HTML 5 differences from HTML 4 by W3C

Jan Hančič
A: 

If you are hesitant to read through a thousand pages of HTML5 specification, take a look at this article. It will give you a good overview of what HTML5 is all about, and it goes to explain how you can use HTML5 right now, since most A-grade browsers actually supports most of the new goodies; like the new HTML-elements and embedded video/audio.

roosteronacid
You're exaggerating somewhat. The spec is only 660 pages.
Ms2ger
+10  A: 

Consider these images (from www.alistapart.com), the structure of a page is hugely different:

HTML4

HTML4

HTML5

HTML5

This is just an example, take a look on other comments for articles about this subject

Harmen
So does this means that we can specify arbitrary tags?
Alix Axel
@Alix Axel: No. There's just gonna be some new, more semantic HTML-elements to play around with.
roosteronacid
No, it is not possible to specify arbitrary tags; these tags are just new tags:http://www.w3schools.com/html5/html5_reference.asp
Harmen
+7  A: 

Broadly speaking, there are four main areas of change:

  • Semantic markup, including the following tags:

    <section> <article> <header> <footer> <nav> <aside> <hgroup>

    This also covers changes to the <doctype>, <html> and <meta> tags, as well as link relations (the rel attribute on an <a> tag).

  • Improved form support - mainly semantic additions to input types, and a few neat things like field autofocus and placeholder text.

  • Multimedia tags - <video>, <audio> and <canvas>. <video> and <audio> are intended to improved better support for embedded media in the page; <canvas> is for programmatic two-dimensional bitmap drawing on the page through JavaScript.

  • Changes to the DOM that are just accessible through JS - navigator.geolocation, window.localStorage (storing user data offline), window.applicationCache (storing app data offline), web workers (multithreaded JavaScript, with some caveats)

Different parts of HTML are in different stages of specification and implementation - the form changes are poorly supported outside of Safari, the <video> tag is basically unusable in a cross-platform environment (without multiple video formats), and IE has built-in support for next to none of these changes.

The best place to read up on HTML5 that I've seen is Mark Pilgrim's excellent book in progress, Dive into HTML5

alunny
that is an excellent book, with a nice visual aesthetic
Anurag