What are pros and cons, If I choose HTML 5 for all new projects?
Everyone, every blog is talking about HTML 5 and giving solution to use HTML in all b开发者_如何学编程rowsers including IE6.
- Should we leave XHTML 1.0 now and go for HTML 5 and use JavaScript for IE6 support?
- Does all other desktop/mobile browser except IE6 supports HTML 5 without adding JavaScript?
- Will every browser render CSS written for HTML 5 elements?
- What about Screen- readers?
What are pros and cons to choose HTML 5 for all new projects?
Pros:
- It has some nice new features
Cons:
- Support for those features is very thin on the ground
- QA tools are immature compared to those for XHTML and HTML 4.x
- The spec is still changing
Should we leave XHTML 1.0 now and go for HTML 5
I wouldn't. I'd stick to HTML 4.01.
and use JavaScript for IE6 support?
You need JS shims for more than IE6. I think IE8 might still require them - and that's for basic support for things like <article>
just so you can apply CSS. Forget about <video>
for the new form stuff.
Does all other desktop/mobile browser except IE6 supports HTML 5 without adding JavaScript?
No
A quick test shows that IE8 and Firefox 3.6 don't support <article>
(IE8 doesn't appear to make it available for styling, Firefox styles it as display: inline
by default)
Will every browser render CSS written for HTML 5 elements?
Not without JS hacks.
What about Screen- readers?
Most will not be able to do anything useful with the new elements
See also http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/
XHTML works with the HTML5 doctype and you need to change nothing as long as you are serving it as application/xml+xhtml and are using the HTML5 doctype.
精彩评论