HTML DOM Map name Property Last Updated : 19 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The Map name property in HTML DOM is used to set or return the value of the name attribute of a map element. This attribute specifies the name of the mapping image. This attribute is associated with <img> usemap attribute. It creates a relationship between the <image> and <map> elements. Syntax: It returns the name property.mapObject.nameIt is used to set the name property.mapObject.name = name Property Values: name: It holds the name of the image-map. Return Value: It returns a string value that represents the name of the map element. Example: html <!DOCTYPE html> <html> <head> <title> HTML DOM Map name Property </title> </head> <body> <h2> GeeksForGeeks </h2> <h3> HTML DOM Map name Property </h3> <h4>Click the button</h4> <map id = "Geeks" name = "Geeks"> <area shape = "rect" coords = "0, 0, 110, 100" alt = "Geeks" href = "https://media.geeksforgeeks.org/wp-content/uploads/a1-21.png"> <area shape = "rect" coords = "110, 0, 190, 100" alt = "For" href = "https://media.geeksforgeeks.org/wp-content/uploads/a1-22.png"> <area shape = "rect" coords = "190, 0, 300, 100" alt = "GEEKS" href = "https://media.geeksforgeeks.org/wp-content/uploads/a1-24.png"> </map> <img src = "https://media.geeksforgeeks.org/wp-content/uploads/a1-25.png" width = "300" height = "100" alt="GFG" usemap = "#Geeks"> <br><br> <button onclick = "GFG()"> Click Here! </button> <p id = "GEEK!"></p> <script> function GFG() { let x = document.getElementById("Geeks").name; document.getElementById("GEEK!").innerHTML = x; } </script> </body> </html> Output: Example 2: html <!DOCTYPE html> <html> <head> <title> HTML DOM Map name Property </title> </head> <body> <h2> GeeksForGeeks </h2> <h3> HTML DOM Map name Property </h3> <h4>Click the button</h4> <map id = "Geeks" name = "Geeks"> <area shape = "rect" coords = "0, 0, 110, 100" alt = "Geeks" href = "https://media.geeksforgeeks.org/wp-content/uploads/a1-21.png"> <area shape = "rect" coords = "110, 0, 190, 100" alt = "For" href = "https://media.geeksforgeeks.org/wp-content/uploads/a1-22.png"> <area shape = "rect" coords = "190, 0, 300, 100" alt = "GEEKS" href = "https://media.geeksforgeeks.org/wp-content/uploads/a1-24.png"> </map> <img src = "https://media.geeksforgeeks.org/wp-content/uploads/a1-25.png" width = "300" height = "100" alt="GFG" usemap = "#Geeks"> <br><br> <button onclick = "GFG()"> Click Here! </button> <p id = "GEEK!"></p> <script> function GFG() { let x = document.getElementById("Geeks").name = "Hello Geeks"; document.getElementById("GEEK!").innerHTML = "The name was changed to " + x; } </script> </body> </html> Output: Supported Browsers: The browsers supported by HTML DOM Map name property are listed below: Google ChromeInternet ExplorerFirefoxSafariOpera Comment More infoAdvertise with us Next Article HTML DOM Input Image name Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM HTML-Property +1 More Similar Reads HTML DOM Meta name Property The HTML DOM Meta name Property is used for returning or setting the name of the name and it is used to reference form data when it has been submitted by the user. It also refers to the element in the javascript. Syntax: It is used to return the name property.metaObject.nameIt is used to set the nam 2 min read HTML | DOM Image name Property The Image name Property in HTML DOM is used for setting or returning the value of the name Attribute of an <image> element. Note: This property is not supported by HTML 5. Syntax: imageObject.name Property Values: name: It specifies the name of the Image. Return Value: It returns a string valu 2 min read HTML DOM name Property The DOM name Property is used to return the name of the attribute. It is used for read-only. Syntax: attribute.name Return Value: This property returns a string value that represents the name of the attribute. Example: In this example, we are using DOM name Property for the attribute. HTML <!DOCT 1 min read HTML DOM localName property The HTML DOM localName property returns the local name of an element. This is a read only property. Syntax: element.localName Return Value: A String representing the local Name of the element. Example: The following example shows how to get localName of an element using this property. html <html 1 min read HTML DOM Input Image name Property The HTML DOM Input Image name Property is used for setting or returning the value of the name attribute of the Input Image. The name Attribute is used to reference the form-data after submitting the form or to reference the element in JavaScript. Syntax: To returns the name Property: imageObject.nam 2 min read HTML DOM nodeName Property The nodeName property is used to return the name of the specified node as a string. It returns different values for different nodes such as if the node attributes, then the returned string is the attribute name, or if the node is an element, then the returned string is the tag name. It is a read-onl 2 min read Like