Question

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

Was it helpful?

Solution

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

OTHER TIPS

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

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top