HTML DOM doctype Property


The DOM doctype property The DOM doctype property tells you about the type of document in HTML. The DocumentType object's name property gives the object's name. If there's no document type declared, it gives back a Null value.

Syntax:

document.doctype

Example:In this instance, we'll employ the "doctype" property to retrieve the document type declaration (doctype) of an HTML document.