Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<!doctype>

<!doctype>

Specifies the version of HTML that you use in the page. The <!doctype> tag is the first tag in any HTML page. It is not clear to me whether you need this line or not. At the moment, browsers don’t seem to care. I suspect that when XHTML hits the street you'll need it. Some tools like Allaire’s Homesite and Microsoft’s Frontpage add it anyway.

To refer to HTML 4.0:

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

To refer to HTML 3.2:

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

Here's what it all means:

  • The !doctype html public section says that this is an HTML document type that public browsers can read
  • The -//w3c section refers to the organistion (World Wide Web Consortium) who produce the HTML standard. They decide what tags you can and cannot use. You can visit them at http://www.w3.org and read about HTML
  • The //ddt html 4.0 stands for Document Type Description HyperText MarkUp Language (version) 4.0. This is the version of HTML you use
  • The //en section just says the page is in English