DOCTYPEs
A DOCTYPE tag tells your Internet browser which HTML, or XHTML, specification your page uses. It's the absolute very first thing in your document, and it takes the place of the <html> tag. You still have to put </html> at the end of your page.
HTML
HTML 4.01 specifies the page types Strict, Traditional, and Frameset.HTML Strict DTD
Use this when you want clean, uncluttered code. Use this with Cascading Style Sheets (CSS.)
< HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML Transitional DTD
This includes attributes/elements that are expected to move to a style sheet (such as the <font> tag that has been deprecated.) Use this when you absolutely have to have tags such as the <font> tag, because your visitors' browsers' don't support Cascading Style Sheets (however, you probably won't use this one as most recent browsers support CSS.)
< HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
HTML Frameset DTD
Use this DOCTYPE when your layout is coded in frames/iframes.
< HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
XHTML
XHTML is the next generation of HTML. XHTML 1.0 specifies the three XML document types Strict, Traditional, and Frameset.XHTML Strict DTD
Use this when you want clean, uncluttered code. Use this with Cascading Style Sheets (CSS.)
< html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML Transitional DTD
This includes attributes/elements that are expected to move to a style sheet (such as the <font> tag that has been deprecated.) Use this when you absolutely have to have tags such as the <font> tag, because your visitors' browsers' don't support Cascading Style Sheets (however, you probably won't use this one as most recent browsers support CSS.)
< html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML Frameset DTD
Use this DOCTYPE when your layout is coded in frames/iframes.
< html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
All information from W3Schools.