Question

Is there any reason to use HTML 4 instead of HTML 5?

Était-ce utile?

La solution

HTML5 is not something that is supported or isn't supported.

It's not even a complete specification yet. Browsers may or may not support some of HTML5 features. Legacy browsers may have no support at all for newer features introduced with HTML5. As long as you don't use any of the new features introducted in HTML5, your document will be compatible with legacy browsers too.

If you plan to use some of the new features not supported by legacy browsers, and at the same time making them compatible with your site, you need to choose a different method to display your content.

If you want to make HTML5 compatible with most browsers, I suggest you to use some good tools, like Boilerplate and Modernizr.

Also, I really suggest to read this explanation about HTML 5.

Autres conseils

Sticking to HTML 4-only markup and features ensures backwards compatibility with a huge array of old clients.

That's about it. In practice, you will rarely have to support such old clients (unless you do, you know who you are) and/or you can use Javascript shims to pull old clients into the HTML 5 era. Given this, there's typically no practical benefit to sticking with HTML 4.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top