HTML Doctype

The doctype declaration refers to a Document Type Definition (DTD). The doctype is an instruction to the web browser about what version of the markup language the page is written in. The doctype declaration should be the very first thing in an HTML document, before the <html> tag.

This is the<!DOCTYPE ...> declaration for HTML version 3.2

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

For HTML 4.0, the situation is a little more complicated.
There are  three standard doctypes.

STRICT
The DTD for documents that strictly conform  (don't use any deprecated markup i.e. font and center) and frameset are not allowed,use this <!DOCTYPE ...>:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">

TRANSITIONAL
For a not quite so strict conformance (uses some of the deprecated markup such as <CENTER ...>) but frameset are not allowed, use this <!DOCTYPE ...>:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">

FRAMESET
To allow the frameset documents (the "top" document in a framed page), use this <!DOCTYPE ...>:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"http://www.w3.org/TR/REC-html40/frameset.dtd">

EXAMPLE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
 <title>Title of the document</title>
 </head>

 <body>
 The content of the document......
 </body>
 </html>
Posted in Html Tagged with: ,