DocumentTypeBaseline Widely availableThis feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.Learn moreSee full compatibilityReport feedbackThe DocumentType interface represents a Node containing a doctype. EventTarget Node DocumentType Instance propertiesInherits properties from its parent, Node. DocumentType.name Read only The type of the document. It is always "html" for HTML documents, but will vary for XML documents. DocumentType.publicId Read only A string with an identifier of the type of document. Empty if the doctype given specifies no public ID. DocumentType.systemId Read only A string containing the URL to the associated DTD. Empty if the doctype given specifies no system ID. Instance methodsInherits 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. SpecificationsSpecificationDOM # interface-documenttypeBrowser compatibilitydesktopmobileChromeEdgeFirefoxOperaSafariChrome AndroidFirefox for AndroidOpera AndroidSafari on iOSSamsung InternetWebView AndroidWebView on iOSDocumentTypeChrome – Full supportChrome1Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox1Toggle historyOpera – Full supportOpera12.1Toggle historySafari – Full supportSafari3Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android12.1Toggle historySafari on iOS – Full supportSafari on iOS1Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android37Toggle historyWebView on iOS – Full supportWebView on iOS1Toggle historyafterChrome – Full supportChrome54Toggle historyEdge – Full supportEdge17Toggle historyFirefox – Full supportFirefox49Toggle historyOpera – Full supportOpera39Toggle historySafari – Full supportSafari10Toggle historyChrome Android – Full supportChrome Android54Toggle historyFirefox for Android – Full supportFirefox for Android49Toggle historyOpera Android – Full supportOpera Android41Toggle historySafari on iOS – Full supportSafari on iOS10Toggle historySamsung Internet – Full supportSamsung Internet6.0Toggle historyWebView Android – Full supportWebView Android54Toggle historyWebView on iOS – Full supportWebView on iOS10Toggle historybeforeChrome – Full supportChrome54Toggle historyEdge – Full supportEdge17Toggle historyFirefox – Full supportFirefox49Toggle historyOpera – Full supportOpera39Toggle historySafari – Full supportSafari10Toggle historyChrome Android – Full supportChrome Android54Toggle historyFirefox for Android – Full supportFirefox for Android49Toggle historyOpera Android – Full supportOpera Android41Toggle historySafari on iOS – Full supportSafari on iOS10Toggle historySamsung Internet – Full supportSamsung Internet6.0Toggle historyWebView Android – Full supportWebView Android54Toggle historyWebView on iOS – Full supportWebView on iOS10Toggle historynameChrome – Full supportChrome1Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox1Toggle historyOpera – Full supportOpera12.1Toggle historySafari – Full supportSafari3Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android12.1Toggle historySafari on iOS – Full supportSafari on iOS1Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android4.4Toggle historyWebView on iOS – Full supportWebView on iOS1Toggle historypublicIdChrome – Full supportChrome1Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox1Toggle historyOpera – Full supportOpera12.1Toggle historySafari – Full supportSafari3Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android12.1Toggle historySafari on iOS – Full supportSafari on iOS1Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android4.4Toggle historyWebView on iOS – Full supportWebView on iOS1Toggle historyremoveChrome – Full supportChrome24Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox23Toggle historyOpera – Full supportOpera15Toggle historySafari – Full supportSafari7Toggle historyChrome Android – Full supportChrome Android25Toggle historyFirefox for Android – Full supportFirefox for Android23Toggle historyOpera Android – Full supportOpera Android14Toggle historySafari on iOS – Full supportSafari on iOS7Toggle historySamsung Internet – Full supportSamsung Internet1.5Toggle historyWebView Android – Full supportWebView Android4.4Toggle historyWebView on iOS – Full supportWebView on iOS7Toggle historyreplaceWithChrome – Full supportChrome54Toggle historyEdge – Full supportEdge17Toggle historyFirefox – Full supportFirefox49Toggle historyOpera – Full supportOpera39Toggle historySafari – Full supportSafari10Toggle historyChrome Android – Full supportChrome Android54Toggle historyFirefox for Android – Full supportFirefox for Android49Toggle historyOpera Android – Full supportOpera Android41Toggle historySafari on iOS – Full supportSafari on iOS10Toggle historySamsung Internet – Full supportSamsung Internet6.0Toggle historyWebView Android – Full supportWebView Android54Toggle historyWebView on iOS – Full supportWebView on iOS10Toggle historysystemIdChrome – Full supportChrome1Toggle historyEdge – Full supportEdge12Toggle historyFirefox – Full supportFirefox1Toggle historyOpera – Full supportOpera12.1Toggle historySafari – Full supportSafari3Toggle historyChrome Android – Full supportChrome Android18Toggle historyFirefox for Android – Full supportFirefox for Android4Toggle historyOpera Android – Full supportOpera Android12.1Toggle historySafari on iOS – Full supportSafari on iOS1Toggle historySamsung Internet – Full supportSamsung Internet1.0Toggle historyWebView Android – Full supportWebView Android4.4Toggle historyWebView on iOS – Full supportWebView on iOS1Toggle historySee also The DOM interfaces index. DOMImplementation.createDocumentType() to create a new DocumentType node.