15

From searching SO, this question was already asked, almost a year ago now.

So now with the new FF, Opera, IE, is it finally time to start developing sites with HTML5 or is it still a little premature and will cause compatibility issues?

Is using HTML5 just going to require us to use more and more JS on websites to 'trick' older browsers into working properly?

Ryan Doherty
  • 38,580
  • 4
  • 56
  • 63
user103219
  • 3,209
  • 11
  • 39
  • 50
  • 2
    I don't see why you'd need JS trickery. All of the HTML5 features I've seen so far have fallback features for browsers which don't support the new elements. – Turnor Jul 27 '09 at 15:31
  • As with any new standard there will always be features that are not supported by older browsers. So if IE6 doesn't know what to do when it sees < nav > something is going to have to tell it what to do. – user103219 Jul 27 '09 at 16:24
  • Google is using it, so sure!! – Josh Stodola Jul 27 '09 at 17:14
  • 2
    @Turnor: there's at least one thing I know of that requires some JS trickery: IE won't style the new elements like section unless you add a |document.createElement("section");|. – Ms2ger Jul 27 '09 at 19:36

8 Answers8

6

It's a great idea if used in a "Progressive Enhancement" way. ie. Code your website to work in "standard" HTML 4.01 mode, and then add some fancy HTML 5 bits to give it some extra flourishes in browsers that support HTML 5

Frozenskys
  • 4,290
  • 4
  • 28
  • 28
4

If you add nice features to your site, it is possible it will be talked about and reach the news sites for some free publicity.

Aside from that, It would make a good beta site and give you a head start for when it becomes the new technology. However, until HTML 5 enabled browsers are widespread (at least 20% of the market, possibly 50%) it makes little sense to alienate nearly the whole internet.

Wil
  • 10,234
  • 12
  • 54
  • 81
  • Just checking my recent reputation and I got -2 from this, which I answered ages ago? Do people normally rate down old posts? – Wil Aug 17 '09 at 16:12
  • 1
    HTML5 browsers are widespread. Firefox, Safari & Chrome make up > 30% of the market. They support new elements (header, footer, article), video and audio tags and numerous other features. There are even ways to degrade gracefully for IE (http://ejohn.org/blog/html5-shiv/). – Ryan Doherty Dec 07 '09 at 03:08
  • ... But they didn't almost half a year ago when I wrote that answer!... – Wil Dec 14 '09 at 20:34
  • 12
    If your answer -becomes- wrong, and you don't update it, shouldn't you expect it's rating to reflect the current best answer? That's the benefit of stackoverflow over a static forum, questions are more likely to be a better reflection of current best practices. – Kzqai Jan 03 '10 at 04:32
  • 2
    I disagree. Do you regularly review all of your old posts, just to ensure that current trends haven't rendered anything you said in the past less correct? I know I don't. Old information is just that and should be considered as such. – Rich.Carpenter Jun 17 '11 at 13:11
  • @Rich.Carpenter A down-vote is a good indication that your answer needs to be reviewed further. That works for out-of-date answers as well as bad info. BTW, -1 for this answer being out of date and for the person who wrote it spending more effort complaining about it than it would take to fix it. – Evan Plaice Apr 06 '12 at 01:11
  • @EvanPlaice - it would have taken longer to edit the answer... and, I still maintain that the answer was right at the time of the question... and the question sort of deals with a time (the release of browsers) rather than an ongoing thing. – Wil Apr 06 '12 at 10:29
  • @Wil And it's wrong now. If you want to maintain historical accuracy, there's no problem with that but don't take the downvote personal. It's important to the rest of us that information stays accurate/relevant. You could probably save some rep if the OP were to chang the accepted answer but you know; 'the cream rises to the top,' and such... – Evan Plaice Apr 06 '12 at 21:48
  • @EvanPlaice Never took it personally! – Wil Apr 06 '12 at 22:09
3

If there is a feature in HTML 5 would be useful for the project you are working on, then it is worth considering using it.

You will need to weigh the benefits against the possibility of the specification changing, the less mature testing tools available for HTML5 validation and the probability that you will need to use JavaScript to fake support in older browsers (of course, the HTML 5 spec gives a roadmap that someone else may have already followed in writing such JS).

If HTML 4.01 gives you everything you need — stick with that.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
3

Assess your target audience. Are they likely to be early-adopters? Is it critical that all visitors to your site are catered for? Or will a few not mind being met with an inconvenient, yet polite "please upgrade your browser" message?

For business sites I'd say no. Not yet, anyway. You probably can't afford to lose users of older browsers.

For a personal website or project, why not? It'll be great experience learning the latest HTML5 features, and you'll be ahead of the curve when it does become mainstream. Besides, more people writing sites conforming to HTML5 means more pressure on users of older browsers to upgrade, benefitting all of us in the long run.

Sam Wessel
  • 8,830
  • 8
  • 40
  • 44
2

The answer is most certainly YES. Firefox, Safari, Chrome and Opera make up more than 30% of the market and they support many HTML5 standards:

  • Audio & video tag
  • New tags (footer, header, section, etc)
  • Canvas
  • HTML5 doctype (<!DOCTYPE html>)

validator.w3.org supports HTML5 validation (it's experimental, but it seems stable)

For IE you can use these things to make some HTML5 elements work:

Hope that helps, and gets you started using HTML5!

Ryan Doherty
  • 38,580
  • 4
  • 56
  • 63
  • BUT when printing a page using IE its CSS doesn't get interpreted properly, because during printing JavaScript isn't processed, so there's no HTML5 shiv. Look at this: http://doctype.com/arent-my-media-declarations-recognized-properly-across-browsers#answer_2910 Does someone know a solution to this? Maybe I should ask a separate question. – Marcel Korpel Feb 10 '10 at 01:37
1

Bruce Lawson of Opera gave an interesting presentation on this at OSCON, see his slides; the verbal conclusion was that it's OK, though there was some debate. Of course that's from somebody working for a browser maker so they're going to be less worried about older browsers (since everybody upgrading is to their advantage;-). The more you need to worry about older browsers, the worse your life is in general of course, but html 5 wouldn't help you there, sigh!-(

Alex Martelli
  • 854,459
  • 170
  • 1,222
  • 1,395
1

I have begun developing pages with the new HTML5 DOCTYPE:

<! DOCTYPE html>

This new DOCTYPE essentially puts the browser into a sorta "standards-based mode." Obviously this is all pretty new to most browsers but creating pages under this DOCTYPE will allow sites to last longer than ever. This also degrades gracefully within every browser I have tested in and no noticeable HTML or CSS downsides.

W3C has began using an experimental validator for HTML5 which can be used the exact same way as all of their other validation engines. An intersting side note: According to the W3C validator, you do not need to close the BODY or HTML tag at the end of the page; allowing for very minimal load time decreases.

As HTML5 continues to make its way to the forefront, I plan to begin implementing more advancements that just the DOCTYPE. For now that seems to be all that is new and widely supported.

Hope this helps. -B

Brad Birdsall
  • 1,753
  • 3
  • 23
  • 27
  • ""you do not need to close the or tag at the end of the page"" - Sorry which tag are you referring too? – user103219 Jul 27 '09 at 16:14
  • Sorry the site removed the tags automatically. Now Editted. -B – Brad Birdsall Jul 27 '09 at 16:16
  • 1
    Mode switching using Doctypes has been around since IE6. The HTML5 "Doctype" adds nothing new to this. If anything, it takes things away (i.e. the DTD that could be validated against using a generic SGML or XML validator). Likewise, the optional end tags for the HTML and BODY elements have been a feature of the language forever, HTML 4.x certainly has them. I've never bothered to read the DTDs for earlier versions to see. – Quentin Jul 28 '09 at 13:51
0

This site has a pretty good HTML5 shiv for IE. Just include it on you page and you can then style the HTML5 elements.

http://html5.adamhunter.me/examples/html-shiv

Davin Studer
  • 1,501
  • 3
  • 15
  • 28