Jump to content

HTML doctypes: what do I use in 2011?


mpsn

Recommended Posts

Hi, I hope someone can shed some light as to what is the best doctype to use for html dtd in 2011?

 

I am confused and in my web design course back in 2009, I was told to use html 4 transitional strict, but what should i use now as we approach 2012? I would like the webpages i develop to be viewable by all browsers all the time.

 

All help appreciated?

Link to comment
Share on other sites

HTML5 is the ideal doctype to have, but seeing as a good percentage or people are still using XP and IE6 and 7, you should just maintain that same HTML4.01 Traditional/Strict/etc. doctype that has been around since 1999.

 

Unless you absolutely need HTML5 features I don't see any point in using it.  Here is a rundown of differences.

http://dev.w3.org/html5/html4-differences/

Link to comment
Share on other sites

HTML5 doctype is understood by all browsers and it's the minimum that you can get away with so there is no reason you can't use it from the off. For example check Google's source.

 

No need to go for strict or loose unless you have the validation requirements.

Link to comment
Share on other sites

IE 6-8 don't recognize the HTML5 doctype.

 

Actually that is not true - the doctype is fully backwards compatible back to IE6.

 

It will make sure quirks mode isn't rendered and modern browsers will specifically know it's HTML5.

 

It is only the elements such as nav, aside, article etc that IE has a trouble with, which is why a JavaScript HTML5 Shiv exists.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.