Jump to content
Sign in to follow this  
FutureWebDeveloper

Doctype Declaration

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>?

Share this post


Link to post
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/

Share this post


Link to post
Share on other sites

Either it's older websites or they haven't wanted to move on to HTML 5.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...