Advanced | Help | Encyclopedia
Directory


Document Type Declaration

(Redirected from DocType)

A Document Type Declaration (DOCTYPE for short) 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:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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









Links: Addme | Keyword Research | Paid Inclusion | Femail | Software | Completive Intelligence

Add URL | About Slider | FREE Slider Toolbar - Simply Amazing
Copyright © 2000-2008 Slider.com. All rights reserved.
Content is distributed under the GNU Free Documentation License.