可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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?
回答1:
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.
回答2:
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
回答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.
回答4:
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.
回答5:
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:
- HTML5 shiv: http://ejohn.org/blog/html5-shiv/ , this allows you to style new tags in IE
- Fallbacks for IE when using the video tag: http://hacks.mozilla.org/2009/06/html5-video-fallbacks-markup/
- ExplorerCanvas: http://code.google.com/p/explorercanvas/ , allows the use of canvas in IE
- And IE supports the HTML5 doctype, it simply renders in strict mode, which is fine.
Hope that helps, and gets you started using HTML5!
回答6:
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!-(
回答7:
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
回答8:
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