The following is a list of basic DOCTYPE declarations that go into the header (at the very top) of your web site or page. The DOCTYPE is an instruction to the web browser about what version of the markup language the page is written in. HTML markups are for basic static pages. XHTML utilizes well-formed XML to incorporate dynamic items as well as some of the basic elements of HTML. Strict Doctypes do not typically support interactive or dynamic elements. Transitional are more adaptable to dynamic or interactive information. Here are some brief breakdowns of the current DOCTYPEs in existence:
Quite possibly the simplest DOCTYPE of them all! HTML5 is also the most common, currently accounting for nearly 66% of all pages on the internet.
HTML 4.01 Strict
THTML 4.01 Strict is a more minimal version of HTML 4.01 that puts an emphasis on structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4 Strict. By writing to HTML 4 Strict, authors can achieve accessible, structurally rich documents that easily adapt to style sheets and different browsing situations.
|<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>|
HTML 4.01 Transitional
This declares the document to be HTML 4.01 Transitional. HTML 4 Transitional includes all elements and attributes of HTML 4 Strict but adds presentational attributes, deprecated elements, and link targets.
|<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>|
XHTML 1.0 Strict
This declares the document to be XHTML 1.0 Strict. XHTML 1.0 Strict is an XML version of HTML 4 Strict. The markup must also be written as well-formed XML.
|<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>|
XHTML 1.0 Transitional
This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). This type does not allow framesets. The markup must also be valid XML.
|<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>|