I do some coding in HTML, and was wondering what doc type header to use. How do I know if I am coding in HTML 4.0.1 Strict or HTML 4.0.1 Transitional? (or any other type)
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.
You should choose DOCTYPE depending on the HTML tags that you use and your HTML writing style. Let me clarify that.
HTML 4.0.1 Strict – Basically allows zero style tags. For styling such pages you should only use CSS. Some tags that are not allowed in Strict:
<center> <font> <u>etc. Also note that Strict requires closing tags for everything. You must use this:Also in Strict all tags have to be nested correctly. Therefore, this style is cleaner and better formated. This makes it more reliable in the long run.
HTML 4.0.1 Transitional – Allows all those style tags and some other deprecated HTML tags. Also it does not require to use closing tags everywhere. In my personal opinion Transitional is really the lazy coders choice and should only be used in very specific situations.
You can read more about the differences between DOTCYPE’s here:
Converting XHTML transitional to HTML 4.01 strict
What is and what isn’t XHTML
Also read more about DOCTYPE’s from W3Schools here:
HTML !DOCTYPE Declaration
HTML HTML 4.01 / XHTML 1.0 Reference