Are There Any Pros to Use HTML 5 Doctype `<!DOCTYPE html>` Without Using HTML 5 Tags?
Are there any pros to use the HTML 5 doctype <!DOCTYPE html>
, even if I am not using any new HTML 5 tags? Are there any benefits to replacing the XHTML doctype with the HTML 5 doctype, even if I am not using any new HTML 5 tags?
Can the HTML 5 doctype create开发者_开发百科 problems in terms of functionality if I am using anything XML related with my site, or using HTML 5 for web development with any A-Grade browser? Is it supported in all desktop and mobile browsers?
Or, for right now, is it good to stick with the XHTML Doctype until 2015?
You may be interested to check out John Resig's blog post on this topic (the founder of jQuery):
What's nice about this new DOCTYPE, especially, is that all current browsers (IE, FF, Opera, Safari) will look at it and switch the content into standards mode - even though they don't implement HTML5. This means that you could start writing your web pages using HTML5 today and have them last for a very, very, long time.
You may also want to check out the following Stack Overflow post (August 2008):
- Any reason not to start using the HTML 5 doctype?
Is there any pros to use HTML 5 doctype even if i'm not using any new HTML 5 tag?
Slightly less typing.
That's about it.
I wouldn't use the HTML5 doctype yet. With this doctype you're stating that your document conforms to a specification that is still a moving target. IMO: wait until the spec is finished and the validation process tied down.
Absolutely. It works in every browser except IE6. There's shorter script declarations. And it's easy to remember.
It will surely break at least one old browser out there, so I recommend not using HTML 5 unless your page is actually HTML 5.
Also, XHTML and HTML 5 are not strictly compatible.
精彩评论