Jump to content

Doctype Declaration


FutureWebDeveloper

Recommended Posts

Sorry I got a newbie question to ask (as embarassing as it sounds). I know that for HTML5 we use declaration "<!DOCTYPE html>", but for other websites I' am guessing HTML4 and below version's people use "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">". But I notice that some pretty professional programmers and websites use the HTML4 doctype declaration I posted above. Why do they do that instead of using HTML5 "<!DOCTYPE html>?

Link to comment
Share on other sites

It depends on when the sites were built but HTML5 has not been official release and that many older (legacy) browsers do not support it fully. Nevertheless they can use the new doctype instead of the previous ones. Since IE 10 has been release you will find more sites using the html5 doctype as a standard. If you do use HTML5 tags and want to support legacyIE browers you will want to use a shiv or shim script which you can read about here: http://code.google.com/p/html5shim/

Link to comment
Share on other sites

What does html5shim do? I read its for ie 9 specifically.. does ie 9 not support html5?
IE9 does not regconize many of the new HTML5 tags and so using the shim (shiv) script allows the tags to be styled. As for IE10, it seems to be supporting HTML5 well. IE9 or earlier is another story where nearly 50% of all users uses either IE9, IE8, IE7 and (yes..unbelievable) even IE6. So in order to push forward with using HTML5, someone had developed the shim (shiv) a few years back to satisfy this advancement. Also, keep in mind that CSS3 lacks support for IE9 or earlier as well. Here's a good source to help you determine what CSS3 code works with each browser.http://fmbip.com/litmus/ Edited by newseed
Link to comment
Share on other sites

Either it's older websites or they haven't wanted to move on to HTML 5.
It is also possible that for reasons like for example G2 says we do not know enough about HTML 5 and until we do you can't use it. So in some cases blame the Security guys.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...