Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 402   Yesterday: 1,023   Max: 1,872   Total: 419,078   Current Users : 12 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 

<!DOCTYPE ...>

Usage Recommendation
Use this tag if you want to use an
SGML/HTML validator. Otherwise, this tag is of little use.

The <!DOCTYPE ...> declaration (technically it's not a "tag") should be the very first thing in your document... if you choose to use it at all. <!DOCTYPE ...> tells the browser what version of HTML you are writing in. More specifically, <!DOCTYPE ...> declares that this document conforms to a specific version of HTML, and specifies what version that is.

The necessity of <!DOCTYPE ...> is a subject of much debate. The standards published by W3C require the use of <!DOCTYPE ...>. However, much of the HTML being written does not conform strictly the W3C specifications, and so using <!DOCTYPE ...> (which is, after all, a claim that you conform to the standards) would seem unnecessary.

However, <!DOCTYPE ...> has its place on a page, even if you decide to use a little non-standard markup. <!DOCTYPE ...>'s most useful purpose is when used in conjunction with one of the various HTML analyzers. The analyzers look to the <!DOCTYPE ...> to determine what type of HTML you are trying to write. Our recommendation is that you use the appropriate <!DOCTYPE ...>. It won't hurt and allows you to make use of the HTML checkers available.

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. The DTD for documents that strictly conform (don't use any deprecated markup) and that aren't frameset documents, use this <!DOCTYPE ...>:

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

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

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

Finally, for documents which are 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">



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.