html map tag

In the html <map> tag is used to identify an image map and also which tag is used to create image map inside of <area> and it is working client sides. The name, usemap attributes will use for <map> tag. The name attributes is using for image map name and usemap attributes is using for create to relationship between map and source image and map tag includes many area tag that is clickable in the image map.

The <map> tag required attributes is name and standard attributes are class, dir, id, lang ,style ,title ,xml:lang and Event attributes are onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown onkeypress and onkeyup.


<map> ... </map>

Example Code

<img src = "../../images/html-tutorial.jpg" border = "0" usemap = "#html_tutorial" />
  <map name = "html_tutorial">
  <area shape = "rect" coords = "0,0,230,126" href = "../../html-tutorials/html-what-is.php" alt = "Html Tutorials" target = "_blank" />

Out Put:

Html Tutorials Html Tutorials

In the above example has been applied <map> tag for HTML keyword.if you click HTML word, it open new page and you can not click tutorial keyword.