MENU
DOCTYPE
A. HTML5 (2012)
<!DOCTYPE html>
declares the document as HTML5. The deprecated tags include: <acronym>, <applet>, <bgsound>, <basefont>, <big>, <blink> <center>, <dir>, <font>, <fn>, <frame>, <frameset>, <ilayer>,<isindex>,<layer>,<listing> <marquee>, <nobr>, <noembed>, <noframes>, <nolayer>, <plaintext>, <strike>, <tt>, <xml> and <xmp>.
B. HTML 4.01 and XHTML 1.0 Strict(2000)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
exclude presentational or deprecated elements like <font>. Framesets are not allowed. The second declaration must conform to XML.
C. HTML 4.01 and XHTML 1.0 Transitional (2000)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd">
include all elements but framesets are not allowed. The second declaration must conform to XML.
D. HTML 4.01 and XHTML 1.0 Frameset (2000)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/ frameset.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
include all elements and allow the use of framesets. The second declaration must conform to XML.
E. XHTML 1.1(2001)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
is about the same as XHTML 1.0 Strict, but allows modularization.
F. HTML 3.2 (1997)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
G. HTML 3.0 (1995)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
H. HTML 2.0 (1995)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Level 2//EN">
Extensible HyperText Markup Language (XHTML) is a stricter version of HTML in the sense that:
1) <DOCTYPE>, <html>, <head>, <title> and <body> are mandatory.
2) The XML namespace ie. the xmlns attribute in <html> is mandatory.
3) The elements must be closed, properly nested and in lowercase. (eg. <br> is not closed.)
4) The attributes must have names in lower case and values quoted.
5) Attribute minimization is not allowed. For example, <textarea readonly> must be replaced with <textarea readonly=”readonly”>.