Programmer's Guide > Interfaces > W3C Document interface > doctype attribute
  
doctype attribute
The Document Type Declaration (see DocumentType) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns null. The DOM Level 2 does not support editing the Document Type Declaration. docType cannot be altered in any way, including through the use of methods inherited from the Node interface, such as insertNode or removeNode.
doctype
Access
read-only
Returns
DocumentType