!DOCTYPE

Specifies the Document Type Definition (DTD) to which the document conforms.

TopElement

Specifies the top-level element type declared in the DTD. This corresponds to the Standard Generalized Markup Language (SGML) document type being declared.

HTML Default. HTML.

 

Availability

Specifies whether the formal public identifier (FPI) is a publicly accessible object or a system resource.

PUBLICDefault. Publicly accessible object.
SYSTEM System resource, such as a local file or URL.

 

Registration

Specifies whether the organization is registered by the International Organization for Standardization (ISO).

+Default. Organization name is registered.
- Organization name is not registered. The a Windows Store app using JavaScript and World Wide Web Consortium (W3C) are not registered ISO organizations.

 

Organization

Specifies a unique label indicating the name of the entity or organization responsible for the creation and maintenance of the DTD being referenced by the !DOCTYPE declaration—the OwnerID.

IETFIETF.
W3CW3C.

 

Type

Specifies the public text class, the type of object being referenced.

DTD Default. DTD.

 

Label

Specifies the public text description, a unique descriptive name for the public text being referenced. Can be appended with the version number of the public text.

HTML Default. HTML.

 

Definition

Specifies the document type definition.

Frameset frameSet documents.
Strict Excludes the presentation attributes and elements that the W3C expects to phase out as support for style sheets matures.
Transitional Contains everything except frameSet elements.

 

Language

Specifies the public text language, the natural language encoding system used in the creation of the referenced object. It is written as an ISO 639 language code (uppercase, two letters).

ENDefault. English language.

 

URL

Specifies the location of the referenced object.

This declaration must occur at the beginning of the document, before the html tag.

The !DOCTYPE element does not require a closing tag.

The following examples show how to use the !DOCTYPE declaration to specify the DTD a document conforms to, and to switch a Windows Store app using JavaScript to standards-compliant mode.

Both of the declarations in the following example specify conformance to the HTML 4.0 DTD. The second declaration specifies "Strict" conformance to this DTD. The first declaration does not. Both declarations switch a Windows Store app using JavaScript to standards-compliant mode.


<!DOCTYPE html public "-//W3C//DTD HTML 4.0//en">
<!DOCTYPE html public "-//W3C//DTD HTML 4.0 Strict//en">

Both of the declarations in this example specify conformance to the "Transitional" HTML 4.0 DTD. The second declaration specifies the URL of the DTD. The first declaration does not. The second declaration switches a Windows Store app using JavaScript to standards-compliant mode. The first declaration does not.


<!DOCTYPE html public "-//W3C//DTD HTML 4.0 Transitional//en">
<!DOCTYPE html public "-//W3C//DTD HTML 4.0 Transitional//en" 
    "http://www.w3.org/TR/html4/loose.dtd">

 

 

Show:
© 2014 Microsoft