LearnWebDesignOnline.com is proudly hosted by Hostmonster.com

The doctype is the first line in the HTML file that is to indicate the HTML version that the author intends the page to be written in. Ideally, you should have a valid doctype as the first line of all HTML pages. Otherwise certain browsers will render your page in "Quirks Mode".
Note that Dreamweaver can generate the doctype in a new skeleton HTML file by "File -> New -> General -> Basic Page -> HTML" and then select the "document type" from the droplist and click "Create".
To understand the different version of HTML/XHTML and which doctype to use, read Sitepoint's article "HTML or XHTML" to learn the history of the different version of HTML up to HTML 4 and the spin-off of XHTML 1.0. The article also gives some thoughts about the future versions such as HTML 5 and XHTML 2.
The article implies that there is benefit to using XHTML even if it means having to serve it as "text/html" mime-type rather than "application/xhtml+xml" mime-type as it was intended. Whether you go with HTML 4 or XHTML 1, there are three doctypes to choose from: strict, transitional, or frameset.
If you have trouble deciding which doctype to go with, we recommend going with XHTML 1.0 strict as is what you see in this article "Learn HTML and CSS: An Absolute Beginner's Guide"
