Citizendia
Your Ad Here

A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document (for example, a webpage) with a Document Type Definition (DTD) (for example, the formal definition of a particular version of HTML). The Standard Generalized Markup Language ( ISO 88791986 SGML) is an ISO Standard Metalanguage in which one can define Markup languages Don't change "Extensible" A web page or webpage is a resource of information that is suitable for the World Wide Web and can be accessed through a Web browser. Document Type Definition ( DTD) is one of several SGML and XML schema languages and is also the term used to describe a document or portion thereof that HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax.

Despite its name, a Document Type Declaration is not suitable for deducing the type of the document,[1] although apparently it was originally supposed to be.

The HTML layout engines in modern web browsers perform DOCTYPE "sniffing" or "switching", wherein the DOCTYPE in a document served as text/html determines a layout mode, such as "quirks mode" or "standards mode". HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure A layout engine, or rendering engine, is software that takes marked up content (such as HTML, XML, image files etc A web browser is a software application which enables a user to display and interact with text images videos music games and other information typically located on a Quirks mode refers to a technique used by some Web browsers for the sake of maintaining backwards compatibility with Web pages designed for older browsers instead of The text/html serialization of HTML 5, which is not SGML-based, uses DOCTYPE only for mode selection. HTML 5 ( HyperText Markup Language 5) is planned to be the fifth major revision of the core language of the World Wide Web, HTML.

Contents

DTDs

Syntax

The general syntax for a Document Type Declaration is:

<!DOCTYPE root-element [SYSTEM OR PUBLIC FPI] "uri" [ 
<!-- internal declarations -->
]>

In XML, the root element of the document is the first element in the document (In XHTML, the root element is html - being the first element opened and last closed). The keywords SYSTEM and PUBLIC suggest what kind of DTD it is (one that is on a private system or one that is open to the public). If the "SYSTEM" keyword is chosen, the URI of the DTD may follow; if the PUBLIC keyword is chosen then the declaration must have a FPI (Formal Public Identifier) following it and then the URI of the DTD (the FPI for XHTML 1. The Formal Public Identifier (FPI is undoubtedly the least well-understood part of the Document type declaration, an integral component of valid HTML, XML 1 is "-//W3C//DTD XHTML 1. 1//EN").

The last part is called an internal subset which can be used to add/edit entities or add/edit elements. This is optional in XML.

Document Type Declarations are slightly different in SGML, where you may associate the public identifier with the system identifier, as it is in HTML.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. 01//EN">

Example

The first line of many World Wide Web pages reads as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1. The World Wide Web (commonly shortened to the Web) is a system of interlinked Hypertext documents accessed via the Internet. 0 Transitional//EN" "http://www. w3. org/TR/xhtml1/DTD/xhtml1-transitional. dtd">

This Document Type Declaration for XHTML includes by reference a DTD, whose public identifier is -//W3C//DTD XHTML 1. A public identifier is a document processing construct in SGML and XML. 0 Transitional//EN and whose system identifier is http://www. w3. org/TR/xhtml1/DTD/xhtml1-transitional. dtd. An entity resolver may use either identifier for locating the referenced external entity. The root element is declared to be html.

HTML 5

HTML 5 has a unique doctype, which is very short and has no Document Type Definition. HTML 5 ( HyperText Markup Language 5) is planned to be the fifth major revision of the core language of the World Wide Web, HTML. This is how it appears:

<!DOCTYPE HTML>

XHTML 1. 0 DTDs

XHTML's DTDs are also Strict, Transitional and Frameset. The Extensible Hypertext Markup Language, or XHTML, is a

XHTML Strict DTD is the most strict DTD available: no deprecated tags are supported and the code must be written correctly. In Computer software standards and documentation the term deprecation is applied to Software features that are superseded and should be avoided

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1. 0 Strict//EN" 
"http://www. w3. org/TR/xhtml1/DTD/xhtml1-strict. dtd">

XHTML Transitional DTD is like the XHTML Strict DTD, but deprecated tags are allowed. This is the most popular current DTD.

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

XHTML Frameset DTD is the only XHTML DTD that supports Frameset. The DTD is below.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1. 0 Frameset//EN" 
"http://www. w3. org/TR/xhtml1/DTD/xhtml1-frameset. dtd">

XHTML 1. 1 DTD

This is the latest DTD that has the stringency of XHTML 1. 0 Strict, and it is based upon the module framework and modules defined in Modularization of XHTML. XHTML modularization is a methodology for producing modularized markup languages in a number of different schema languages (currently DTDs XML Schema and Relax

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1. 1//EN" 
"http://www. w3. org/TR/xhtml11/DTD/xhtml11. dtd">

XHTML Basic DTDs

XHTML Basic 1. 0

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1. 0//EN"
 "http://www. w3. org/TR/xhtml-basic/xhtml-basic10. dtd">

XHTML Basic 1. 1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1. 1//EN"
 "http://www. w3. org/TR/xhtml-basic/xhtml-basic11. dtd">

XHTML Mobile Profile DTDs

XHTML Mobile Profile 1. 0

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1. 0//EN" 
"http://www. wapforum. org/DTD/xhtml-mobile10. dtd">

XHTML Mobile Profile 1. 1

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1. 1//EN" 
"http://www. openmobilealliance. org/tech/DTD/xhtml-mobile11. dtd">


XHTML Mobile Profile 1. 2

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1. 2//EN" 
"http://www. openmobilealliance. org/tech/DTD/xhtml-mobile12. dtd">

References

  1. ^ http://groups.google.com/group/comp.text.sgml/msg/c3e53dee2c152a81

See also

External links

Document Type Definition ( DTD) is one of several SGML and XML schema languages and is also the term used to describe a document or portion thereof that Document Type Definition ( DTD) is one of several SGML and XML schema languages and is also the term used to describe a document or portion thereof that Quirks mode refers to a technique used by some Web browsers for the sake of maintaining backwards compatibility with Web pages designed for older browsers instead of
© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic