Nossos voluntários ainda não traduziram este artigo para o Português (do Brasil). Junte-se a nós e ajude-nos a fazer o trabalho!
Você também pode ler o artigo em English (US).

The DocumentType interface represents a Node containing a doctype.

Properties

Inherits properties from its parent, Node, and implements the ChildNode interface.

DocumentType.entities Read only
A NamedNodeMap of entities declared in the DTD. Every node in this map implements the Entity interface.
DocumentType.internalSubset Read only
A DOMString of the internal subset, or null if there is none. Eg "<!ELEMENT foo (bar)>".
DocumentType.name Read only
A DOMString, eg "html" for <!DOCTYPE HTML>.
DocumentType.notations Read only
A NamedNodeMap with notations declared in the DTD. Every node in this map implements the Notation interface.
DocumentType.publicId Read only
A DOMString, eg "-//W3C//DTD HTML 4.01//EN", empty string for HTML5.
DocumentType.systemId Read only
A DOMString, eg "http://www.w3.org/TR/html4/strict.dtd", empty string for HTML5.

Methods

Inherits methods from its parent, Node, and implements the ChildNode interface.

ChildNode.remove()
Removes the object from its parent children list.

Specifications

Specification Status Comment
DOM
The definition of 'DocumentType' in that specification.
Living Standard Added implemention of the ChildNode interface.
Removed the internalSubset, entities, and notation properties.
Document Object Model (DOM) Level 3 Core Specification
The definition of 'DocumentType' in that specification.
Obsolete No change from Document Object Model (DOM) Level 2 Core Specification.
Document Object Model (DOM) Level 2 Core Specification
The definition of 'DocumentType' in that specification.
Obsolete Added the publicID, systemID, and internalSubset properties.
Document Object Model (DOM) Level 1 Specification
The definition of 'DocumentType' in that specification.
Obsolete Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
entities
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox No support 1 — 6IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support 4 — 6Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
internalSubset
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android ?
nameChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
notations
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox No support 1 — 6IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support 4 — 6Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
publicIdChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
systemIdChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

See also

Etiquetas do documento e colaboradores

Etiquetas: 
Última atualização por: connorshea,