Document Type Declaration
Document type declaration
A document type declaration is what you need to put at the top of ALL WebPages. If you don’t your HTML won’t be valid which means most browsers will render your code however they fancy, this will mean your site will look different in each browser and that is something you don’t want.
So in this article we will walk you through two basic document declarations and what they means.
XHTML 1.0 Strict looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
W3 defines XTHML 1.0 Strict as a reformulation of HTML 4 in XML 1.0, for more details click here.
HTML 4.01 Strict looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML 4.01 Strict is the an upgrade from HTML4 for more details click here.
If you enjoyed this post you might enjoy these:




2 Comments to “Document Type Declaration”