This is called a DOCTYPE
It means that the author has (supposedly) built the site to conform to W3C standards. In this case, specifically standards for HTML 4.0 Transitional.
This allows the browser to know how it should interpret the code that has been written.
Since the coder is using a standard it's easier to ensure that the code is rendered in the same way across different devices.
When using DOCTYPES you should ensure that your page validates to the DOCTYPE by using a validator like the one available at the W3C site.
Now if I do not have any DOctype page gets displayed fine
If I have
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Transitional//EN">
But if I have
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
The left side menue go at the bottom of the page. Does that mean that IE is thinking that I have used HTML 4.0 but in HTML 4.0 menues are not made the way I have built it here?
It means your site is not coded to standards but actually to cater to IE's quirks. By providing a doctype IE jumps out of the quirks into as-close-to-standards-as-we-can-get mode and your page breaks. Read the article given to you, put a doctype on your page (first thing) and start redesigning. If you think that is a stupid thing to do, be aware that your page was probably looking broken in every other browser but IE already.
Suggest you have a look at your page in a browser that is closer to being standards-compliant (Mozilla, Firefox, Opera etc), then you will see how broken your site really is!
When you recognise the extent of the problems for yourself, then go back to the advice given above, and start redesigning. There are several sites to check your page for compliance, including:
Check your site on them to get a feel for where you are.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?' Drive a Steam Roller
It will show you how different doctypes you use affect your rendering differently. If it says Q (quirks mode), then doctype is not in effect -- and browser treats it as if there's no doctype specified. If it is S (standards mode) then browser adheres to standards and users the standards rendering engine. With your first doctype it clearly works in quirks mode and with the second one in standards mode. Note that the difference in both engines is huge only for IE. Both quirks mode and standards mode are very similar (and work like standards mode) in other browsers, so your content is broken everywhere but IE.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.