XML DOM » Document » doctype

Syntax:
document.doctype

This is a read-only property that contains the document type node that specifies the DTD for the document.

For HTML documents, and XML documents without a DTD, it returns null.