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 This is an obsolete API and is no longer guaranteed to work.
A NamedNodeMap of entities declared in the DTD. Every node in this map implements the Entity interface.
DocumentType.internalSubset Read only This is an obsolete API and is no longer guaranteed to work.
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 This is an obsolete API and is no longer guaranteed to work.
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() This is an experimental API that should not be used in production code.
Removes the object from its parent children list.

Specifications

Browser compatibility

BCD tables only load in the browser

See also