| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/DocumentType | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since July 2015.
The DocumentType interface represents a Node containing a doctype.
Inherits properties from its parent, Node.
DocumentType.name Read onlyThe type of the document. It is always "html" for HTML documents, but will vary for XML documents.
DocumentType.publicId Read onlyA string with an identifier of the type of document. Empty if the doctype given specifies no public ID.
DocumentType.systemId Read onlyA string containing the URL to the associated DTD. Empty if the doctype given specifies no system ID.
Inherits methods from its parent, Node.
DocumentType.after()Inserts a set of Node objects or strings in the children list of the
object's parent, just after this node.
DocumentType.before()Inserts a set of Node objects or strings in the children list of the
object's parent, just before this node.
DocumentType.remove()Removes this object from its parent children list.
DocumentType.replaceWith()Replaces the document type with a set of given nodes.
| Specification |
|---|
| DOM # interface-documenttype |
DOMImplementation.createDocumentType() to create a new DocumentType node.This page was last modified on Oct 24, 2024 by MDN contributors.
DocumentTypeAbortControllerAbortSignalAbstractRangeAttrCDATASectionCharacterDataCommentCustomEventDOMErrorDOMExceptionDOMImplementationDOMParserDOMTokenListDocumentDocumentFragmentElementEventEventTargetHTMLCollectionMutationObserverMutationRecordNamedNodeMapNodeNodeIteratorNodeListProcessingInstructionQuotaExceededErrorRangeShadowRootStaticRangeTextTreeWalkerXMLDocumentXPathEvaluatorXPathExpressionXPathResultXSLTProcessorYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |