Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- The !Doctype tag is a top-level tag known as a Public Text Identifier.
It appears at the very beginning of a document and serves to identify the
content of the document as HTML conforming to a particular DTD
specification. Almost all popular browser parsers allow the omission of
this tag (probably because they are expecting HTML and they interpret only
those tags which they can handle.) There are many different ways to specify
a Public Text Identifier even within a particular HTML specification. HTML
specifications allow for different evaluation levels as well as strict
DTD interpretation schemes.
- Attributes
- This tag accepts no attributes
- Example
- HTML 2.0: <!DOCTYPE
HTML
PUBLIC "-//IETF//DTD HTML 2.0 Level 2//EN">
- HTML 3.0: <!DOCTYPE
HTML
PUBLIC "-//IETF//DTD HTML Strict//EN//3.0">
- HTML 3.2: <!DOCTYPE
HTML
PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN">
- Note:
- This is a small sample of allowed values. It does not include all
possible variations.
Please see the current
HTML specifications at
W3 for a complete list of Public Text Identifiers for each
specification.)
- Parent Model
- NA
- Content Model
- <html>
Tips & Tricks
- Some HTML validation tools will need to have the !DOCTYPE
statement present in order to choose the proper DTD to validate
against.
Browser Peculiarities
- No popular browsers seem to care about this tag (because they
expect the content of the documents to be HTML), but it is important
when defining the language, as this statement serves to identify the
HTML language version to strict SGML parsers.
Related Sites
- Official References
- ftp://ds.internic.net/rfc/rfc1866.txt
- RFC 1866: The HTML 2.0 specification (plain text)
- http://www.w3.org/pub/WWW/MarkUp/html-spec
- The web version of the HTML 2.0 (RFC 1866) specification
- http://www.w3.org/pub/WWW/MarkUp/Wilbur/
- The HTML 3.2 (Wilbur) proposal
- http://www.w3.org/pub/WWW/MarkUp/Cougar/HTML.dtd
- The experimental HTML (Cougar) draft
- Other Resources
- http://www.ccs.org/html/dtd/
- Harold Driscoll's excellent listing of popular public HTML Document
Type Definitions
Boring Copyright Stuff...