Forum : How to put hyperlink on an Image File
Brief description  about Online courses   join in Online courses
View Praveen  Kumar N 's Profile

How to put hyperlink on an Image File

How can I put two hyperlinks on an image without making the image itself a link?
Asked by Praveen Kumar N | Oct 11, 2009 |  Reply now
Replies (7)
View deepak kumar 's Profile
its working perfectly!!!
Nov 1, 2009
View praveen kumar-n 's Profile
If we use this code, I am not getting hyperlink in the image.
Oct 20, 2009
View sahana basavaraju 's Profile
For two hyperlink for the image, then the best solution is Mapping of the image where the cord is used for each of the bits of images...
Oct 19, 2009
View sahana basavaraju 's Profile
Hi Praveen,

This is how we usually add a hyperlink to image......

The code is: <a href="Location.html"><img name="imgName" width="width" height="height" vspace="Verticalspace" hspace="Horizontalspace" src="pathToImage" id="imgID" /> </a>
Oct 19, 2009
View teacher siliconindia 's Profile
Hi

<img src="file:///C|/Documents and Settings/Administrator/Desktop/toppart.jpg" width="587" height="234" border="0" usemap="#Map" />
<map name="Map" id="Map"><area shape="rect" coords="41,45,221,146" href="#" /></map>


The above code is for mapping.
Use this code for giving multiple or single link to your image
"coords="41,45,221,146" according to your image change the number inside the coords so it will change the map position

Regards
SiliconIndia team.
Oct 12, 2009
View praveen kumar-n 's Profile
It is not working..
Oct 12, 2009
View sanjay s nair 's Profile
Hi
I guess you could also use javascript to redirect to a page when click an image.
The code is somewhat like the below : -

<img src="pathtoimage" onClick="javascript:window.location='somepage.html'" />

Please try this, i haven't actually tried this.

Regards,

Sanjay S Nair
Oct 12, 2009