mpsn Posted December 11, 2011 Share Posted December 11, 2011 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? Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/ Share on other sites More sharing options...
Zane Posted December 11, 2011 Share Posted December 11, 2011 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/ Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/#findComment-1296951 Share on other sites More sharing options...
Stiver112 Posted December 12, 2011 Share Posted December 12, 2011 yep... HTML5 is the short and correct anwnser Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/#findComment-1297116 Share on other sites More sharing options...
nano Posted December 12, 2011 Share Posted December 12, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/#findComment-1297259 Share on other sites More sharing options...
mpsn Posted December 12, 2011 Author Share Posted December 12, 2011 so all browsers new and old, also if anyone can take a look, i need some help with css as I am new to it: http://www.phpfreaks.com/forums/index.php?topic=349708.0 all help apreciated. Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/#findComment-1297262 Share on other sites More sharing options...
haku Posted December 14, 2011 Share Posted December 14, 2011 HTML5 doctype is understood by all browsers IE 6-8 don't recognize the HTML5 doctype. That doesn't mean your code won't be parsed, but the fact remains. Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/#findComment-1297731 Share on other sites More sharing options...
nano Posted December 14, 2011 Share Posted December 14, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/252957-html-doctypes-what-do-i-use-in-2011/#findComment-1297772 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.