How To Create Multiple Links On A Single Image With Image Map

Danial-Softwares

How To Create Multiple Links On A Single Image With Image Map

How To Create Multiple Links On A Single Image With Image Map

HTML Image Map has been around all this while, and yet not many web pages are using it when it comes to single image with multiple links. It’s really handy and fast for web designers or developers to create multiple “Hot Spots” linking within a single image, without slicing any image for linking.

For instance, your client has given you a list of sponsors and he wants each of the logo to be linked to the sponsor’s web page on his website. You may want to try out Image Map, it will make your job much easier.

 

What Is Image Map?

Basically, Image Map is a way that allow you to define certain area to be linked within a single image on a web page. This means that, rather than having to link the whole image as one link, you can have lots of different links within that one image.

Still not sure what is Image Map? Check out the demo.

Before we start here are the general attributes for the map tag.

<br /><map name="map-name">
<area title="area title" alt="alternate text" coords="area coordinates" shape="area shape" href="area hyperlink" target="hyperlink target" nohref="nohref" />
</map>
<br />

Most of the attributes are used quite often, let’s talk about the shape and the coords attributes. For shape attribute it have rect | circle | poly | default.

For coords attribute, below is a simple overview diagram for the coordinates.

Image Map Coordinates Overviews

In this tutorial, you will see how you can link several logos to their web pages within a single image. First is to have your image ready, here I mashed up some of the popular web logos into one image.

Web Logos

First create your normal image HTML markup, notice usemap="#logos" attribute, this is to associate the image map with the image.

<br />    <img alt="Web Logos" src="images/weblogo.jpg" usemap="#logos" /><br /><br />

Next you will need to find out the coordinates for each of the logo using Photoshop. Let start with a circular logo, first load the image into Photoshop, press F8 for the Info Panel to appear, move your cursor to centre of the circular logo and note down the coordinates.

Centre of Circle

We will also need to find the radius of the circle. By finding out the difference between the edge of the circle’s coordinates and centre coordinates of the circle, or by using the rule tools in Photoshop. Either way will help you find out the radius of the circle.

Circle Radius

Now let’s find the coordinates for a rectangular logo. You just have to find out the top left and bottom rightcoordinates of the rectangular logo. Using the same method above you will be able to find the coordinates easily.

Rectangular Coordinates

Once you have find out all the coordinates for each logo, now everything is easy. Just follow the attributes for theMap Tag listed above and enter all the coordinates for each of the shapes you have found.

<br /><map name="logos">
<area title="StumbleUpon" alt="StumbleUpon" coords="68,56,33" shape="circle" href="http://www.stumbleupon.com/" />
<area title="Youtube" alt="Youtube" coords="220,19,306,54" shape="rect" href="http://www.youtube.com/" />
<area title="Google" alt="Google" coords="367,32,516,84" shape="rect" href="http://www.google.com/" />
<area title="Wikipedia" alt="Wikipedia" coords="556,12,639,115" shape="rect" href="http://www.wikipedia.com/" />
<area title="Skype" alt="Skype" coords="128,62,244,114" shape="rect" href="http://www.skype.com/" />
<area title="Yahoo" alt="Yahoo" coords="301,103,444,136" shape="rect" href="http://www.yahoo.com/" />
<area title="eBay" alt="eBay" coords="25,158,135,207" shape="rect" href="http://www.ebay.com/" />
<area title="Flickr" alt="Flickr" coords="180,147,271,175" shape="rect" href="http://www.flickr.com/" />
<area title="Digg" alt="Digg" coords="299,166,379,208" shape="rect" href="http://www.digg.com/" />
<area title="Wordpress.org" alt="Wordpress.org" coords="500,184,32" shape="circle" href="http://wordpress.org/" />
<area title="Blogger" alt="Blogger" coords="599,142,667,209" shape="rect" href="http://www.blogger.com/" />
<area title="Default" alt="Default" shape="default" nohref="nohref" />
</map>
<br />

For custom shape link, you can try poly shape attribute. Just defining those important coordinates and it will form up a more precise Hot Spot area for the link.

Special thanks to Terrance.

 

80 Comments

  1. hi thanks so much for this simple tut. it works perfectly fine and is exactly what i need.

    However, i would like to ask, is it possible to track the posistion on the image as my image is resizing accordingly to windows size. Once my window is minimized the posistion of the button is lost

    Reply
  2. You have opened a whole new way of working for me here, thank you for your lucid and precise explanation.

    In Photoshop/Info I had to click the “+” alongside XY and set the coordinates to Pixels

    Reply
  3. You are the beeeeeeeest <3

    Reply
  4. thanks a lot, very good tutorial !!!!!!!!!!

    Reply
  5. Hi,

    When I have all of my coords and made it into the HTML format, how do it put it on the image? I’m using blogger. Help appreciated thanks 🙂

    Reply
  6. really great … thank you so much … it’s working ..

    Reply
  7. Thanks for the awesome tutorial.I will surely implement in my blog now 🙂

    Reply
  8. i mostly learned my mistakes by practicing and practicing if some body posts like this then many people move fast and they will learn much more in less time
    thanks a lot keep on posting

    Reply
  9. Greetings from Carolina! I’m bored at work so I decided to take a look at your internetsite on my iphone during lunch break. I actually like the info you provide here and may’t wait to take a look when I get home. I’m shocked at how fast your weblog loaded on my phone .. I am not even using WIFI, just 3G .. Anyhow, good site!

    Reply
    • Danial Nikbin

      our website is completely compatible with phones and tablets. Thank you for your comment.

      Reply
  10. le delinquant perdait la partie de ses, von Erzen oder Mineralien:)

    Reply
  11. Youre so cool! I dont suppose Ive read anything like this before. So nice to find any person with some original thoughts on this subject. realy thank you for starting this up. this website is something that is needed on the web, someone with a bit of originality. useful job for bringing something new to the internet!

    Reply
  12. Very good information can be found on website.

    Reply
  13. Really enjoyed your insights

    Reply
  14. An impressive share, I just given this onto a colleague who was doing a little bit analysis on this. And he in fact bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If attainable, as you become expertise, would you mind updating your blog with more details? It is highly helpful for me. Massive thumb up for this blog publish!

    Reply
  15. You gonna be a great writer one day

    Reply
  16. Appreciate it for this post, I am a big big fan of this site would like to continue updated.

    Reply
  17. I’m not sure where you are getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for wonderful info I was looking for this information for my mission.

    Reply
    • Danial Nikbin

      As I mentioned Terrance helped me a lot in this post. Thank you for your comment.

      Reply
  18. Interesting column , I’m going to spend a lot more time reading about this subject

    Reply
  19. Very interesting information!Perfect just what I was looking for! “The whole point of getting things done is knowing what to leave undone.” by Lady Reading.

    Reply
  20. Hello, I read your new stuff on a regular basis. Your writing style is witty, keep up the good work!

    Reply
  21. Hi to every , as I am in fact keen of reading this blog?s post to be updated daily. It contains pleasant material.

    Reply
  22. Greetings! Very helpful advice in this particular article! It is the little changes that will make the most important changes. Many thanks for sharing!

    Reply
  23. I am truly pleased to glance at this website posts which includes plenty of useful data, thanks for providing such statistics.

    Reply
  24. Hi, just wanted to tell you, I liked this article. It was funny. Keep on posting!

    Reply
  25. In the grand pattern of things you actually get a B- just for effort and hard work. Where exactly you actually misplaced us ended up being on all the facts. You know, as the maxim goes, details make or break the argument.. And it couldn

    Reply
  26. Awsome article and straight to the point. I don’t know if this is in fact the best place to ask but do you guys have any ideea where to employ some professional writers? Thank you 🙂

    Reply
  27. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how can we communicate?

    Reply
  28. Whoa! This blog looks just like my old one! It’s on a completely different topic but it has pretty much the same page layout and design. Excellent choice of colors!

    Reply
  29. Only a smiling visitor here to share the love (:, btw great pattern .

    Reply
  30. Howdy! Someone in my Facebook group shared this site with us so I came to take a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Wonderful blog and great design.

    Reply
  31. Awesome content, nice design, great website

    Reply
  32. I’m not that much of a internet reader to be
    honest but your sites really nice, keep it up!
    I’ll go ahead and bookmark your website to come back in the future.
    Many thanks

    Reply
  33. great work, thanks

    Reply
  34. Good post. I learn something new and challenging on sites I stumbleupon everyday. It’s always helpful to read through articles from other authors and use something from their websites.

    Reply
  35. I really enjoyed your post. Also where did you get that background image on your site?

    Reply
    • Danial Nikbin

      Our background is not an image its a color (CSS color).

      Reply
  36. After looking over a number of the blog posts on your site, I really like your way
    of blogging. I saved it to my bookmark website list and will be
    checking back soon. Please check out my web site as well and let me know how you feel.

    Reply
  37. Do you have a spam problem on this website; I also am a blogger, and I was wondering your situation; many of us have created some nice procedures and we are looking to trade techniques with others, be sure to shoot me an e-mail if interested.

    Reply
  38. I do believe all of the concepts you have presented to your post. They are very convincing and will definitely work. Still, the posts are too short for beginners. Could you please prolong them a little from next time? Thanks for the post.

    Reply
  39. Definitely have faith in whatever you understood. Your privileged right mind were by the web the easiest thing to know. I request you, I completely get angry little people reflect on qualms they merely have no idea about. You managed to attain the exact nail ahead the top and outlined not on the whole thing without possessing side-effects, ancestors possibly will assume a signal. Desire likely ensue in exchange to get additional. Thanks

    Reply
  40. You have noted very interesting points! ps decent web site.

    Reply
  41. I in fact approximating the stuff you put in now. Very important in rank. Deem yourself book marked.

    Reply
  42. Excellent blog here! Also your website loads up very fast!
    What host are you using? Can I get your affiliate link to your host?
    I wish my site loaded up as quickly as yours lol

    Reply
  43. Hey very cool web site!! Man .. Beautiful .. Superb ..
    I’ll bookmark your web site and take the feeds additionally?
    I am satisfied to find numerous useful info here in the publish, we’d like work out more techniques on this regard, thank you for sharing.
    . . . . .

    Reply
  44. Great post, enjoyed it alot…looking forward to the next one

    Reply
  45. I see something genuinely special in this website.

    Reply
  46. Thank you for helping out, excellent information. “Those who restrain desire, do so because theirs is weak enough to be restrained.” by William Blake.

    Reply
  47. Your blog is astounding dude. i really like to go to it everyday. quite good layout and content ,

    Reply
  48. Oh my goodness! a fantastic write-up dude. Thank you Nevertheless I will be experiencing difficulty with ur rss . Do not know why Struggling to sign as much as it. Probably there exists any particular person acquiring identical rss difficulty? Any individual who knows kindly respond. Thnkx

    Reply
  49. I truly appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thx again!

    Reply
  50. Really enjoy the visuals

    Reply
  51. I’d like to thank you for the efforts you’ve put
    in writing this site. I really hope to view the same
    high-grade blog posts by you later on as well.
    In truth, your creative writing abilities has encouraged
    me to get my own, personal blog now 😉

    Reply
  52. You get mentioned truly attractive factors! ps polite website. Hares may gamble within the body of a dull lion. by Publilius Syrus.

    Reply
  53. Hello. Vastly cool blog!! Man .. Outstanding .. Superb .. I will bookmark your web place and take the feeds also…I’m glad to find several cooperative info here inside the post. Recognition for sharing.

    Reply
  54. Generally I don’t interpret article proceeding blogs, except I hope for to articulate that this write-up vastly compelled me to take a look at and achieve it! Your writing taste has been flabbergasted me. Thank you, self-same careful post.

    Reply
  55. You got a exceptionally fantastic website, Sword lily I originate it through yahoo.

    Reply
  56. I truly like your website.. extremely nice colors & theme. Did you style this web site oneself or did you hire someone to accomplish it for you? Plz answer back as I’m seeking to construct my own weblog and would prefer to find out where u got this from. thanks

    Reply
  57. I am really loving the theme/design of your site. Accomplish you endlessly trickle into any net browser compatibility issues? A small range of my blog readers have complained about my blog not in service fittingly in Voyager nevertheless seems fine in Firefox. Achieve you could have any ideas to assist repair this difficulty?

    Reply
  58. Hey Presently there. I identified your weblog use of msn. To facilitate is really a really nicely printed write-up. I will bring in positively to bookmark this and go rearward to recite mega of your respective beneficial communication. Be grateful you to the post. I’ll undoubtedly comeback.

    Reply
  59. Admiring the hard work you put into your uytip blog and in depth information you present. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Excellent read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

    Reply
  60. Simply want to say your article is as amazing. The clarity in your post is simply spectacular and i can assume you’re an expert on this subject. Fine with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please keep up the rewarding work.

    Reply
  61. really nice put up, i really enjoy this web web site, keep on it

    Reply
  62. What’s up to all, how is everything, I think every one is getting more from this website,
    and your views are good in favor of new users.

    Here is my web page :: sbobet

    Reply
  63. An intriguing discussion is definitely worth comment. I think that you ought to publish more on this subject, it may not be a taboo subject but typically people do not talk about these issues. To the next! Kind regards!!

    Reply
  64. You have made your point quite nicely!.

    Reply
  65. Hiya! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My site looks weird when viewing from my iphone4. I’m trying to find a theme or plugin that might be able to correct this issue. If you have any recommendations, please share. With thanks!

    Reply
  66. Rather useful, looking forwards to returning.

    Reply
  67. There’s definitely a lot to learn about this topic. I like all of the points you have made.

    Reply
  68. “Major thankies for the post.Really thank you! Want more.”

    Reply
  69. I simply want to say I am just all new to blogs and seriously liked this blog site. Almost certainly I’m likely to bookmark your website . You certainly have fabulous posts. Thank you for sharing with us your website.

    Reply
  70. bookmarked!!, I love your blog!

    Reply
  71. This website was… how do you say it? Relevant!! Finally I’ve found something that helped me. Thanks!

    Reply
  72. Oh my goodness! Impressive article dude! Thank you, However I am encountering troubles with your RSS. I don’t know why I can’t join it. Is there anyone else having identical RSS problems? Anyone who knows the answer will you kindly respond? Thanx!!

    Reply
  73. Hi outstanding website! Does running a blog such as this require a
    loot of work? I’ve no expertise in computer programming but
    I was hoping to start my owwn blog in the near future. Anyway,
    should you hasve any ideas or tips for new bblog owners please share.
    I know this is off topic but I simply needed to ask.
    Thank you!

    Reply

Submit a Comment

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