| | I've created many HTML websites and to now, I don't know the DOCTYPE declaration on the first line of the document means!!.. I've tried puting it and removing it but nothing happens ... |
|
The effect of using a "proper" Document Type declaration is that the Browser either uses "Standards Compliance" mode to render the page or "Quirks" mode. Quirks mode is where the Browser will guess at the intended rendering and will cause the page to display incorrectly (according to the w3c interpretations). Internet Explorer is the Browser which is usually the problem with using Quirks Mode. Konquerer, Opera, Firefox and Safari are the most compliant Browsers for using Standards Mode. The chances are that if you remove the DocType Declaration and the page doesn't change, then you may not be using a DTD which promotes Standards Mode. A review of the above list of DTD's would then be recommended.
Basically, it tells the browser what language (and what version of that language) your page is in.
I suggest having a look at http://www.w3.org/QA/Tips/Doctype and http://www.w3schools.com/ (and searching for doctype at the second one). |
|
![]() Doctype Declaration - What does it mean? |