HTML: Doctype Declarations

The document type declarations is always the first line before the html tag in a web document.

HTML 4.01 Transitional

Allows depracated html tags. Cannot be used with frames.

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

HTML 4.01 Strict

Does not allow deprecated html tags. Cannot be used with frames.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

HTML 4.01 Frameset

Same as HTML 4.01 transitional but allows frames.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0 Transitional

Allows deprecated tags. Framesets are not allowed. Markup must be written as well-formed XML. For XHTML doctypes the html tag should be <html xmlns=”http://www.w3.org/1999/xhtml”>.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML 1.0 Strict

Framesets are not allowed. Markup must 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">

Html tags not allowed with Strict Doctypes:

<applet>
<basefont>
<center>
<dir>
<font>
<isindex>
<menu>
<s>
<strike>
<u>
<xmp>
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]