HTML DOM designMode Property Last Updated : 30 Aug, 2024 Comments Improve Suggest changes Like Article Like Report 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 whether the document is editable or not.document.designModeProperty Value: This property contains two values which are listed below:off: It is the default value. In this mode, the document is not editable.on: In this mode the document is editable.Example 1: In this example, we will use DOM designMode property. HTML <!DOCTYPE html> <html> <head> <title> DOM designMode Property </title> </head> <body style="text-align: center; "> <h1 style="color: green"> GeeksforGeeks </h1> <h2>DOM designMode Property</h2> <p>This document is editable!</p> <!-- script to set designMode property editable --> <script> document.designMode = "on"; </script> </body> </html> Output: Example 2: In this example, we will use the get method of designMode. HTML <!DOCTYPE html> <html> <head> <title> DOM designMode Property </title> </head> <body style="text-align: center;"> <h1 style="color: green"> GeeksforGeeks </h1> <h2>DOM designMode Property</h2> <button onclick="myFunction()"> Get the designMode </button> <p id="geeks"></p> <!-- script to display designMode --> <script> function myFunction() { let x = document.designMode; document.getElementById("geeks").innerHTML = x; } </script> </body> </html> Output: Supported Browsers: The browser supported by the designMode method are listed below:Google ChromeEdge FirefoxOperaSafari Comment More infoAdvertise with us V Vishal Chaudhary 2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM Similar Reads HTML DOM getElementById() Method The getElementById() method returns the elements that have given an ID which is passed to the function. This function is a widely used HTML DOM method in web designing to change the value of any particular element or get a particular element. If the passed ID to the function does not exist then it r 3 min read HTML DOM getElementsByClassName() Method The getElementsByClassName() method in Javascript returns an object containing all the elements with the specified class names in the document as objects. Each element in the returned object can be accessed by its index. The index value will start with 0. This method can be called upon by any indivi 3 min read HTML DOM defaultView Property The DOM defaultView property in HTML is used to return the document Window Object. The window object is the open windows in the browser. Syntax:document.defaultView Return Value: It is used to return the current Window Object. Example 1: In this example use the defaultView property to get the window 2 min read HTML DOM forms Collection The DOM forms collection is used to return the collection of all <form> elements in a HTML document. The form elements are sorted as they appear in the source code. Syntax: document.forms Properties: It returns the number of form in the collection of elements. Methods: The DOM forms collection 4 min read HTML DOM referrer Property The DOM referrer property in HTML is used to return the URI of the page that linked to the current page. If the user navigates to the page directly or through a bookmark, then this value is an empty string. Syntax:document.referrer The below program illustrates the referrer property in HTML: Example 3 min read HTML DOM getNamedItem() Method The DOM getNamedItem() method in HTML is used to return the attribute node from the NamedNodeMap object.Syntax: namednodemap.getNamedItem( nodename )Parameter's Value: This method contains a single parameter nodename which is mandatory. The nodename is returned from the NamedNodeMap object. Return V 2 min read HTML DOM createEvent() Event Method The createEvent() method in HTML creates an event object of the specified type. The created event must be initialized before use. Syntax:document.createEvent(event_type)event_type: It is the required parameter and is used to specify the type of event. There are many types of events which are listed 2 min read HTML DOM getElementsByTagName() Method The getElementsByTagName() method in the HTML DOM allows the selection of elements by their tag name. It returns a collection of elements with the specified tag name within the specified document or element. To extract any info just iterate through all the elements using the length property. Syntax: 3 min read HTML DOM length Property The DOM length property in HTML is used to get the number of items in a NodeList object. A NodeList is a collection of child Nodes. For example, the NodeList of the body will contain all the child nodes in the body i.e. paragraphs, comments, headings, script, etc.Syntax: nodelist.lengthReturn Value: 2 min read HTML DOM value Property The DOM value property in HTML is used to set or return the value of any attribute.Syntax: It returns the attribute value. attribute.valueIt is used to set a value to the property. attribute.value = valueProperty Value: value: It defines the value of the attribute.Return Value: It returns a string v 2 min read Like