Document Type Declaration |
A Document Type Declaration, or DOCTYPE, associates a particular SGML or XML document with a Document Type Definition (DTD). In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax.
=Example=
A Document Type Declaration can be found in the source code of every Wikipedia page. For example, the first line of many Wikipedia pages reads as follows:
This Document Type Declaration says that the document is of type html (a fairly arbitrary name, actually, but if given, the name of the document s root element must match) and that the Document Type Definition for it is named by the public identifier -//W3C//DTD XHTML 1.0 Transitional//EN. Furthermore, if the public identifier is insufficient for locating a copy of the correct DTD, then http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd may be used as another name for it, and a copy of the actual DTD may be retrieved from that location.
=See also=
|
|