Why should I use a “Strict” doctype vs “Transitional”? It seems like “Strict” is like it says, more strict. I seem to have a hard time getting things to work (css) properly vs using transitional.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Transitional is, essentially, “Strict + things that should almost never be used”.
So use Strict until you find yourself needing something that Transitional adds, and then think very hard about if you really need to use that element or attribute.
There should be no differences in the ways that browsers treat CSS when you switch between those Doctypes, unless you use the short form of the HTML 4.01 Transitional Doctype (i.e. without the URI) or are using HTML 4.0 (don’t, it has no benefits over 4.01 at all).