Copyright © tutorialspoint.com
The HTML <a> tag is used for defining an area in an image map.
In HTML the <area> tag has no end tag.
In XHTML the <area> tag must be properly closed.
<img src=/images/usemap.gif alt="usemap" border="0"
usemap="#tutorials"/>
<map name="tutorials">
<area shape="poly"
coords="74,0,113,29,98,72,52,72,38,27"
href="/perl/index.htm"
alt="Perl Tutorial"
target="_blank" />
<area shape="rect"
coords="22,83,126,125"
alt="HTML Tutorial"
href="/html/index.htm"
target="_blank" />
<area shape="circle"
coords="73,168,32"
alt="PHP Tutorial"
href="/php/index.htm"
target="_blank" />
</map>
|
This will produce following result:
|
To Become more comfortable - Do Online Practice
| Attribute | Value | Description |
|---|---|---|
| alt | text | Specifies an alternate text for the area |
| coords | if shape="rect" then if shape="circ" then if shape="poly" then | Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps |
| href | URL | Specifies the URL of a page or the name of the anchor that the link goes to. |
| nohref | true /false | Excludes an area from the image map |
| shape | rect rectangle circ circle poly polygon | Specifies the shape of the image map |
| target | _blank _parent _self _top | Where to open the target URL.
|
| type | mime_type | Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL |
| Attribute | Description |
|---|---|
| accesskey | Access keys (or shortcut keys) |
| class | Document wide identifier |
| dir | Specifies the direction of the text |
| id | Document wide identifier |
| tabindex | Helps determine the tabbing order when the user 'tabs' through the elements on the page. |
| title | Specifies a title to associate with the element. |
| style | Helps to include inline casecadubf style sheet. |
| lang | Sets the language code. |
| Attribute | Description |
|---|---|
| onfocus | Script runs when the element gets focus |
| onblur | Script runs when the element loses focus |
| onclick | Script runs when a mouse click |
| ondblclick | Script runs when a mouse double-click |
| onmousedown | Script runs when mouse button is pressed |
| onmouseup | Script runs when mouse button is released |
| onmouseover | Script runs when mouse pointer moves over an element |
| onmousemove | Script runs when mouse pointer moves |
| onmouseout | Script runs when mouse pointer moves out of an element |
| onkeypress | Script runs when key is pressed and released |
| onkeydown | Script runs when key is pressed |
| onkeyup | Script runs when key is released |
Copyright © tutorialspoint.com