web api interface
DocumentType
The DocumentType interface represents a Node containing a doctype.
Instance properties
Inherits properties from its parent, Node.
nameRead only- : The type of the document. It is always
"html"for HTML documents, but will vary for XML documents.
- : The type of the document. It is always
publicIdRead only- : A string with an identifier of the type of document. Empty if the doctype given specifies no public ID.
systemIdRead only- : A string containing the URL to the associated DTD. Empty if the doctype given specifies no system ID.
Instance methods
Inherits methods from its parent, Node.
after()- : Inserts a set of
Nodeobjects or strings in the children list of the object’s parent, just after this node.
- : Inserts a set of
before()- : Inserts a set of
Nodeobjects or strings in the children list of the object’s parent, just before this node.
- : Inserts a set of
remove()- : Removes this object from its parent children list.
replaceWith()- : Replaces the document type with a set of given nodes.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
- The DOM interfaces index.
createDocumentType()to create a newDocumentTypenode.