HTML | <map> name Attribute

The HTML <map> name Attribute is used to specify the name of the mapping image, This attribute is associated with the <img> usemap attribute and created the relationship between the image and the map.

Syntax:

<map name="mapname">

Attribute Values:



  • name: it specify the name of the image map.

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML name Attribute
    </title>
</head>
  
<body style="text-align:center;">
  
    <h1>GeeksForGeeks</h1>
    <h2>HTML map name Attribute</h2> `
    <map id="Geeks" name="Geeks">
  
        <area shape="rect"
              coords="0, 0, 110, 100"
              alt="Geeks" 
              href=
  
        <area shape="rect" 
              coords="110, 0, 190, 100" 
              alt="For" 
              href=
  
        <area shape="rect"
              coords="190, 0, 300, 100"
              alt="GEEKS"
              href=
    </map>
  
    <img src=
         width="300" 
         height="100" 
         alt="GFG" 
         usemap="#Geeks">
  
</body>
  
</html>

chevron_right


Output:
Before:

After:

Supported Browsers: The browsers supported by HTML <map> name Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.