Possible Duplicate:
HTML: What is the functionality of !DOCTYPE
I recently asked a question here and the solution was a simple:
You need to add a doctype to the page. This should fix the issue for you.
Now, my pages work fine in every browser without the doctype (except IE). Does IE need a doctype (is this an IE only thing) and do other browsers just assume it OR or is it doing something I’m not seeing.
What are its functions and how does it work?
All browsers need the doctype. Without the
DOCTYPEyou are forcing the browsers to render in Quirks Mode.However,
DOCTYPEwas only partially used by the browsers in determining dialect and parsing, even though that was the purpose. This is why HTML5 has reduced theDOCTYPEto simply:<!DOCTYPE html>Source: HTML5 differences from HTML4: DOCTYPE