[This local archive copy mirrored from the canonical site: http://www.cm.spyglass.com/doc/fpi.html; links may not have complete integrity, so use the canonical document at this URL if possible.]
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0 Strict//EN">
The poor, maligned DOCTYPE declaration. Simply trying to do its job and people seem to have such a time with it:
>What's complicated is all the "-//xxx/" stuff inside the DOCTYPE tag?
>Mere mortals cannot guess what is valid in there, and thus the safest
>things is to leave it out completely. The suggested thing to put there
>has changed so many times over the years and months that it is impossible
>for anyone to know for sure what to put. Who assigns that stuff anyway?
>Does IANA decide? W3C/ERB? You? Me? Captain Kangaroo? Who knows? Not I.
Well, I never thought about myself as more than mere mortal. Hmmm. Maybe I should think about this...
...on closer examination, I'm not any smarter than the average monkey (and no hair on my back). This is not exactly rocket science. It's the label for the Document Type Definition (DTD) to which (theoretically) the document conforms. It's a required part of every HTML document (see the HTML specification, IETF RFC 1866). It's not just "for SGML"; it's what makes your document HTML. If you leave it out you no longer have an HTML document, you have a text document with some HTML tags in it.
Each piece of public text (such as a DTD) has a unique label called a Formal Public Identifier (FPI). The label for a particular DTD doesn't change one iota once it is published. In fact, that's the whole point. If the text changes, there should be a new, unique FPI assigned to it.
NOTE: The FPI's double solidus (forward slash) are field delimiters.
1 2 3 4 5 6 7 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict//EN" >
HTML
"
PUBLIC
"
-
"
IETF
"
DTD
"
HTML 2.0 Strict
"
EN
"
Any HTML book worth reading (and *any* SGML book) will discuss this stuff in detail. Martin Bryan's "Author's Guide to SGML" [BRYAN] is good if you're not looking to spend too much money. If you want to fork out US$100, get Goldfarb's "SGML Handbook" [GOLD90] and begin your intense meditation on words from the prophet hisself.
--Murray
Return to Spyglass Technical Reference
Spyglass, Inc. | Cambridge Spyglass
©1997
Spyglass, Inc. All Rights Reserved.