xorpower
xorpower

Reputation: 18973

How does HTML 5 differ from HTML 4?

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

Upvotes: 3

Views: 2160

Answers (5)

Harmen
Harmen

Reputation: 22438

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

Upvotes: 11

alunny
alunny

Reputation: 900

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

Upvotes: 9

cllpse
cllpse

Reputation: 21727

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.

Upvotes: 1

Jan Hančič
Jan Hančič

Reputation: 53931

HTML 5 differences from HTML 4 by W3C

Upvotes: 5

Related Questions