Take the following <! Doctype> Label For example:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
In the above declaration, the root element of the document is declared HTML, which is defined in the DTD that the public identifier is defined as "-//w3c//dtd XHTML1.0 strict//en". The browser will understand how to find a DTD that matches this public identifier. If it is not found, the browser uses the URL following the public identifier as the location for the DTD.
Tips and Comments:
Note: <! Doctype> tag does not have an end tag!
Html
HTML 4.01 Specifies three document types: Strict, transitional, and Frameset.
Htmlstrict DTD
Use this type if you need clean markup that is free from the clutter of the presentation layer. Use with cascading style sheets (CSS):
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "
Http://www.w3.org/TR/html4/strict.dtd ">
HTML Transitional DTD
The transitional DTD can contain the rendering properties and elements that are expected to be moved into the style sheet by the consortium. Use this type when your readers use a browser that does not support cascading style sheets (CSS) so that you have to use the rendering characteristics of HTML:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "
Http://www.w3.org/TR/html4/loose.dtd ">
Frameset DTD
The Frameset DTD should be used for documents with frames. Except for the frameset element, which replaces the BODY element, the frameset DTD is equivalent to the transitional DTD:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 frameset//en" "
Http://www.w3.org/TR/html4/frameset.dtd ">
Xhtml
XHTML 1.0 Specifies three types of XML documents: Strict, Transitional, and Frameset.
XHTML Strict DTD
Use this type if you need clean markup that is free from the clutter of the presentation layer. Use with cascading style sheets (CSS):
<! DOCTYPE html
Public "-//W3C//DTD XHTML 1.0 strict//en"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
XHTML Transitional DTD
The transitional DTD can contain the rendering properties and elements that are expected to be moved into the style sheet by the consortium. Use this type when your reader uses a browser that does not support cascading style sheets (CSS) so that you have to use the rendering characteristics of XHTML:
<! DOCTYPE html
Public "-//W3C//DTD XHTML 1.0 transitional//en"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
XHTML Frameset DTD
Use this dtd! when you want to use the framework
<! DOCTYPE html
Public "-//W3C//DTD XHTML 1.0 frameset//en"
"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >
Front End Header Label summary