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
https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/
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/

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.