HTML DOM document contentType Property Last Updated : 07 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The contentType property in HTML DOM returns the MIME type in which the document is being rendered. This is a read only property. Syntax: value = document.contentType; Return value: This property returns a string value of MIME content type of the document. Example: This example will show how to get the content MIME Type of the document using this property. HTML <!DOCTYPE html> <html> <body> <h1>GeeksforGeeks</h1> <button onclick="get()"> Get The Content Type of document </button> <script> function get() { alert(document.contentType); } </script> </body> </html> Output: Before Click the Button: After Click the Button: Supported Browsers: Google ChromeEdgeFirefoxOperaSafariInternet Explorer Comment More infoAdvertise with us Next Article HTML DOM createDocumentType() Method T taran910 Follow Improve Article Tags : JavaScript HTML-DOM HTML-Property Similar Reads HTML | DOM contentEditable Property The DOM contentEditable property is used to return a Boolean value where true means the content of an element is editable and false represents the content is not editable. This property is read-only. Syntax: Returns the contentEditable property: HTMLElementObject.contentEditable Set the contentEdita 1 min read HTML | DOM documentURI Property The documentURI property in HTML DOM used to set or return the location of a document. The return value is null If the document was created by the DocumentImplementation object or undefined. The documentURI property can be used on any document types. Syntax: Return the documentURI property: document 1 min read HTML DOM doctype Property The DOM doctype property is used to return the doctype of any HTML document. The DocumentType object is the name property used to return the name of the object. If there is no doctype declared in the document then it returns a Null value. Syntax:document.doctypeExample: In this example, we will use 2 min read HTML DOM compatMode Property The compatMode property in HTML DOM indicates the mode in which the document is rendered, exp Quirks mode or Standards mode. Syntax: var mode = document.compatMode; Return Value: Returns BackCompat if the document is rendered in quirks mode.Returns CSS1Compat if the document is rendered in standards 1 min read HTML DOM createDocumentType() Method The DOMImplementation createDocumentType() method returns a Doctype object which can either be used with DOMImplementation createDocument() method for document creation or can be put into the document. Syntax: var doctype = document.implementation.createDocumentType(qualifiedNameStr, publicId, syste 1 min read HTML DOM designMode Property The DOM designMode property in HTML is used to specify whether the document is editable or not. It can also be used to set the document editable. Syntax:Set: This property is used to set whether the document is editable or not.document.designMode = "on|off";Get: This property is used to return wheth 2 min read Like