MAP/Image Mapping

MAP/Image Mapping

How to map an image using HTML?

Explanation

Image Mapping:
A picture or an image(jpeg, gif.,) can be used as a link to other html page by using ,

and

tags. The image can be used as links just by having the coordinates of shapes like rectangle or circle or polygon.
Example :

Result :

In the above example the rectangular image mappings have been used. We can also use shapes like circle or polygon:

    <area shape=rect coords= x1,y1, x2,y2 Href=”http://www.mycollege.com”>
    <area shape=circle coords= x1,y1, x2,y2 Href=”http://www.funmin.com”>
    <area shape=polygon coords= x1,y1, x2,y2 Href=”http://www.hiox.com”>

Attributes for image area
Class
Indicates that the text is to be formatted using the specified class.
dir=direction
Indicates the direction (right or left) of the text to be displayed. Useful for languages which display left to right.
id=”name”
You can name the text, which allows it to be referred and changed in a script (dynamic HTML).
NAME=”NAME”
Name of an image map.
style= “style”
Defines the style for the text to be displayed title=”title”
You can give a text a title if you want. This provides some additional information about the text.

Leave a Reply

Your email address will not be published. Required fields are marked *