views:

187

answers:

6
+5  Q: 

HTML 4 vs HTML 5

I have been reading a lot about HTML 5 and some of the changes that it offers. It seems though that for most of my needs (LOB apps) it really wouldn't have that big of impact. But recently I had a designer friend of mine tell me that I need to start building everything in HTML 5 because that is what everyone is wanting now.

Can someone give me some good articles or point me in the right direction to really understand what HTML 5 offers me vs HTML 4?

I tried searching for similar posts but didn't come across any so sorry if this is a duplicate.

A: 

The biggest addition is probably the <canvas> tag.

From Wikipedia: "The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bit map and does not have a built in scene graph."

http://en.wikipedia.org/wiki/Canvas_element

This allows you to do things like games that would otherwise require Flash.

In addition, here is an article that discusses a lot of the differences between HTML5 and HTML 4.

http://www.w3.org/TR/2008/WD-html5-diff-20080610/

Climber104
@Climber thanks for the W3 article. I really hate reading those because there is so much there. But I guess I should take some time to look over some of the information there to see if there is anything I can apply to what I am doing now.
spinon
-1 "biggest thing" is subjective and irrelevant. Also video and canvas are not same.
Tomas
+3  A: 

If you're doing LOB stuff and nothing too fancy graphics-wize, then probably the biggest change would simply be using the HTML5 doctype tag:

<!DOCTYPE html>

Even on browsers that don't support HTML5 directly (e.g. IE7) this is interpreted as a valid DOCTYPE and the browser stays in "standards" mode. So as a starting point, that's probably the simplest you can do.

Then you can start looking at some of the additional attributes and so on that HTML5 brings to the table. Support for HTML5 forms is quite lacking at the moment (mostly it's just Chrome/Safari/WebKit and Opera that supports most of them) but it doesn't hurt adding them (they're backwards compatible).

Dean Harding
@Dean thanks for both of these. I never even read anything about these. The forms stuff actually sounds cool. I will definitely start looking into this more.
spinon
Also just being able to type <script> and <style> without the additional attributes is useful. And of course the simplified <meta charset=utf-8>
Ian Devlin
A: 

You still have room to breathe until everyone will be demanding them. In the tech world maybe, but the general population and major corporations still don't have much of a clue about HTML 5. They wont know or care about the difference until a number of sites leverage HTML 5's features.

Noremac
+4  A: 

You don't need to start implementing HTML5 all of a sudden. The spec is still in flux, and is not expected to be fully complete for quite some time. Additionally, browser support is not all there yet. That said, there are things you can do today:

  • Use the new doctype, all browsers should support it
  • Structural elements - article, section, nav, etc. I like these because they provide additional semantics over the generic div. Use the HTML5 shiv script for Internet Explorer compatibility. Update your style sheet to give these elements display: block.
  • New form elements. Not fully supported, but are intended to be backwards compatible.
  • audio and video elements - they provide fallbacks for older browsers.
Grant Palin
This is good advice. The form elements, for example, are a good one to use and add something extra to the browsers that support them whilst they work fine in browsers that don't.
Ian Devlin
+1 good advice.
Tomas
+1  A: 

I think you want Differences between HTML5 and HTML 4

Paul D. Waite
A: 

This is an overview of HTML5 "Family" technologies that I wrote for Dr Dobbs magazine. It's a good place to start for a basic understanding of "HTML5" which is more of a constellation of specs in various stages of completion rather than a single document. Most of what people point to as "HTML5" is really CSS3, and today that's really only working on latest gen mobile browsers as well as Chrome, Safari & Opera.

Michael Mullany