W3cubDocs

/DOM

DocumentType

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

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support Yes Yes 1 Yes Yes Yes
entities No No 1 — 6 No No No
internalSubset No No No No No No
name Yes Yes 1 Yes Yes Yes
notations No No 1 — 6 No No No
publicId Yes Yes 1 Yes Yes Yes
systemId Yes Yes 1 Yes Yes Yes
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support Yes Yes Yes 4 Yes Yes ?
entities No No No 4 — 6 No No ?
internalSubset No No No No No No ?
name Yes Yes Yes 4 Yes Yes ?
notations No No No 4 — 6 No No ?
publicId Yes Yes Yes 4 Yes Yes ?
systemId Yes Yes Yes 4 Yes Yes ?

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DocumentType