HTML DOM doctype property
Definition and Usage
doctype property returns the Document Type Declaration associated with the document (Document Type Declaration).
Read more document types of knowledge objects, please see the document type Object Reference .
Note: If the document does not specify the type of document, the return value is null.
Browser Support
All major browsers support doctype property
Note: Internet Explorer 8 and earlier versions of IE displays HTML and XHTML documents that property returns null, but support for XML documents.
grammar
document.doctype
technical details
return value: | Document type of the document as a DocumentType object. |
---|---|
DOM version | Core Level 1 Document Object |