XHTML requires a valid DOCTYPE at the top of the document; otherwise, the pages won’t validate and the browsers will fall back into what is known as quirks mode.
Quirks mode occurs when a browser treats a web page as “buggy.” As a result, such pages are treated as though they were written in invalid markup, and therefore will be improperly rendered in modern browsers even if the XHTML and CSS are coded perfectly.
A web page that is without a DOCTYPE, with an older DOCTYPE, or with a typo-riddled DOCTYPE triggers quirks mode. So, when coding pages, make sure to check that the DOCTYPE is both added to the page and typed correctly to ensure that browsers do not render pages in quirks mode.
Note:
HTML 4.01 has three document types:
Strict, Transitional, and Frameset.
Both HTML5 and XHTML 1.1 have one
document type, but XHTML 1.0, like
HTML 4.01, has three.
Only one document type definition
(DTD) appears in the HTML document.
Use any one of the following
DOCTYPEs that best fits your project
needs.