Easy Tutorial
❮ Jsref Throw Met Element Removeattribute ❯

HTML DOM doctype Property

Document Object

Example

Return the Document Type Object of the HTML document:


Definition and Usage

The doctype property returns the Document Type Declaration associated with the document.

For more information on Document Type Objects, see the Document Type Object Reference Manual.

Note: If the document does not specify a document type, the return value is null.


Browser Support

All major browsers support the doctype property.

Note: Internet Explorer 8 and earlier versions return null for HTML and XHTML documents, but support XML documents.


Syntax

Technical Details

Return Value: The document type of the document, as a DocumentType object.
DOM Version Core Level 1 Document Object
--- ---
❮ Jsref Throw Met Element Removeattribute ❯