HTML DOM Map name Property Last Updated : 19 Jun, 2023 Comments Improve Suggest changes 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 info M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM HTML-Property +1 More Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists5 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like