Copyright ©

HTML <map> tag



The HTML <map> tag is used for defining an image map along with <img> tag.

Difference between HTML and XHTML:



<img src=/images/html.gif alt="HTML Map" border="0" usemap="#html"/>

<!-- Create  Mappings -->
<map name="html">
   <area shape="circle" 
            coords="154,150,59" href="link1.htm" alt="link 1"
			target="_self" />
   <area shape="poly" 
                    292,166,292,136,270,76" alt="link 2"
			href="link2.htm" target="_self" />
   <area shape="rect" 
            coords="325,224,488,286" alt="link 3"
			href="link3.htm" target="_self" />


Online Practice:

To Become more comfortable - Do Online Practice


nameunique_nameDefines a unique name for the map tag.

Standard Attributes:

classDocument wide identifier
dirSpecifies the direction of the text
idDocument wide identifier
titleSpecifies a title to associate with the element.
styleHelps to include inline casecadubf style sheet.
langSets the language code.
xml:langSets the language code.

Event Attributes:

tabindexHelps determine the tabbing order.
accesskeyAccess keys (or shortcut keys)
onfocusScript runs when a objects gets focus
onblurScript runs when a objects loses focus
onclickScript runs when a mouse click
ondblclickScript runs when a mouse double-click
onmousedownScript runs when mouse button is pressed
onmouseupScript runs when mouse button is released
onmouseoverScript runs when mouse pointer moves over an element
onmousemoveScript runs when mouse pointer moves
onmouseoutScript runs when mouse pointer moves out of an element
onkeypressScript runs when key is pressed and released
onkeydownScript runs when key is pressed
onkeyupScript runs when key is released

Copyright ©