Hyperlink image to open new window

quotes1
How do I make the picture link to an external site, but have it open into a new window?
  quotes2
Some think this is not a good idea. This post is not addressing that. This is simply a post on how to open an image that is linked to another site in a new window.

This is the code that does that:
<a href="URL" title="TITLE"><img src="IMAGE URL" border="0" width="xx" height="xx" alt="Description"></a>
And here is the code with the information plugged in:
<a href="http://seaside-sharon.blogspot.com/" title="Seaside Sharon"><img src="http://farm4.static.flickr.com/3117/2489901121_35e9239f99.jpg" border="0" width="254" height="45" alt="Seaside Sharon header"></a>
Here is the result of using that code.

Seaside Sharon header



post signature

345 comments:

  1. Hi Annie, I just want to thank you for putting up the code for this. I maintain a Wordpress blog and it makes image links open in a new window automatically for me, but for some reason, it wasn't working today. Had to do it manually and this helped a lot!

    ReplyDelete
  2. Very well lesson you have given here for creating hyperlink image using simple example.

    ReplyDelete
  3. Thank You Happy Holiday!

    From Jvtur T
    Global Consumer Network

    Happy New Year!!! to all BlogU

    ReplyDelete
  4. I've been wanting to try this and good thing that I found this link. I'm opening up a blog in a month and this would be really helpful to me. Looking forward to see more tips and information here! :)

    ReplyDelete
  5. Useful piece of code. Thanks

    ReplyDelete
  6. I find most of the comments on this forum very useful. Thanks to all contributors!

    ReplyDelete
  7. Great post.. Very useful.. Thanks for sharing this..

    ReplyDelete
  8. Thanks again as always Annie! Your html tips are always helpful. :)

    ReplyDelete
  9. I really enjoyed reading this post, I was just wondering do you trade featured blog posts. Thanks for sharing your tips with others also for me a big things.

    ReplyDelete
  10. @Jim, Thanks! About the featured blog posts...no, I haven't done that. I just do my own thing.

    ReplyDelete
  11. Wow very useful HTML tips thannksa bunch make money with no money

    ReplyDelete
  12. You've got some helpful tips in here. I have been browsing the net on this kind of matter and thank you it surely answers my question. Hope to find other question that bothers my head in your site. Thanks!

    ReplyDelete
  13. I've been wanting to try this and good thing that I found this link. I'm opening up a blog in a month and this would be really helpful to me. Looking forward to see more tips and information here! :)

    ReplyDelete
  14. very nice post, thanks for these tips

    ReplyDelete
  15. Hi

    Thanks for the help I would apply this.
    But Why have you not applied in your Blog ... here!!!

    ReplyDelete
  16. Great tips as always Annie! Thanks for making it very easy to follow for us HTML newbies :)

    ReplyDelete
  17. Thanks for sharing this. I have been trying to add links this way to contributors of my site. I still need the link to their logo tho correct? Thanks

    ReplyDelete
  18. I've always wanted to do this in my blog but I just didn't know how to. This post is actually a great help and I owe you thanks! Having images in your post is really a plus point especially if it's linked to another site and opens up in new window.

    ReplyDelete
  19. This is a nice trick. Thank you for sharing this >:D<

    ReplyDelete
  20. Ooh so that's how you do it. It's a little trickier than I thought (thought it would just be copy and paste) but I got it to work. Thank you!

    ReplyDelete
  21. Sharing this simple tutorial on how to open an image with a link to other site is very helpful for all the beginners. Yes, it really helps a lot. Thanks!

    ReplyDelete
  22. It's a little trickier than I thought, but I got it to work. Thank you!

    ReplyDelete
  23. I was looking for same thing and finally I found it here. You have resolved my problem.

    ReplyDelete
  24. i will try it on my website www.dzzik.com

    ReplyDelete
  25. Thank you once again, The little codes was super helpful. I figured out how to switch the image to a new one, so I'm including everything from your remarkable thoughts.

    ReplyDelete
  26. This site is a must for newbies wanting to try HTML. You make it look simple and very easy for us to execute those commands. It's a huge help. Thank you so much. :)

    ReplyDelete
  27. I'm always looking for something new in HTML because as an IT student I have to be resourceful and I have to learned different tags in HTML and soon on css, php, javascript and jquery.

    ReplyDelete
  28. Thanks,
    Your blogger theme is cool :)

    ReplyDelete
  29. it is probably one of the first html tricks that I learned way back...

    ReplyDelete
  30. These were really great information given by you, I really appreciate your post, well I think that there is also a way to do this using JavaScript, which gives you more options on the appearance of the new window.


    wall coatings specialist

    ReplyDelete
  31. Interesting post, thanks for your tips and insight.

    ReplyDelete
  32. I actually remember working in FrontPage 2000 or something ike that in design mode, then looking in the code mode looking for changed stuff :) Ahh, the good times :)

    ReplyDelete
  33. Thanks been trying to do that same exact thing on our boating blog. Worked perfectly when I justed tested it out. Thanks and Happy Holidays!

    ReplyDelete
  34. Thanks for sharing informative content. I will definitely get benefit from it.

    ReplyDelete
  35. great article – thanks for sharing

    ReplyDelete
  36. I tried this and it worked perfect! Thanks for the detailed, informative and effective post.

    ReplyDelete
  37. I tried it on one of my sites and it worked. Thanks.

    ReplyDelete
  38. That's a brilliant post! Thanks! I'll do smth like this at my personal site!

    ReplyDelete
  39. Sometimes i forgot with above code because I rarely use it, your post reminded again.

    ReplyDelete
  40. Your blog is very informative. I use a lot of your codes here and it works for me. I am looking forward for new codes from you. You've been such a great help. This is truly a blogger's university.

    ReplyDelete
  41. The classic html code, easy but very useful.
    Don't you think so?

    ReplyDelete
  42. I've been wanting to try this and good thing that I found this link. I'm opening up a blog in a month and this would be really helpful to me. Looking forward to see more tips and information here! :)

    ReplyDelete
  43. I really like this post.. Great job!!!

    ReplyDelete
  44. Thanks for the info. It's the little things like this we often miss. I would prefer to keep people on my pages longer, if possible, so I copied this info and placed in a notepad.

    Thank you.

    ReplyDelete
  45. I hope to see more codes for 2011. It's exciting to try new ones to reinvent my blog. You've been a great help! Thanks! :)

    ReplyDelete
  46. If you want the image to open in a new window don't you have to add target="_blank" to the link tag?

    cloth diapers

    ReplyDelete
  47. Been trying to do this for a while luckily this post helped me out with the html. Thanks!

    ReplyDelete
  48. Hi Annie,
    I will promote your templates in my collection blog. http://www.thebloggertemplates.com

    Regards
    Eva

    ReplyDelete
  49. Cheers for that, I already knew how to do it but I'll pass on this link so that I don't have to explain it to others anymore. You have done a much better job than I seem to. Thanx

    ReplyDelete
  50. This is the first time I-ve found your blog! Really interesting reading and I will continue to show up here :)

    ReplyDelete
  51. Thenks for your post, this very help me...

    ReplyDelete
  52. This is what I was looking for. Short and sweet. Thanks for the share.

    ReplyDelete
  53. Hyperlink image to open new window, i have done this many times, and i made many mistakes, the simple codes really work well.

    ReplyDelete
  54. Great information for us all, many many thanks

    ReplyDelete
  55. Hey Annie

    Thanks for the code, this really useful. What I usually do is to use the form that Wordpress gives- it already asks for the link and if you want it to be opened in a new page or not.

    best,
    Tom

    ReplyDelete
  56. I would have used the underscore blank target attribute, but good tip none the less

    ReplyDelete
  57. Thank you for sharing, will be sure to use this for my site!

    ReplyDelete
  58. thanx, this helps. this whole stuff is new for me.

    ReplyDelete
  59. Thanks for the code snippet! I have been looking for this.

    ReplyDelete
  60. This code is excellent, it's great as people who are reading blogs who are not computer savvy, they will not lose your website so they can easily continue to read the rest of your article. Thanks alot Annie.

    ReplyDelete
  61. Thanks for posting this code... Thank you for sharing!

    ReplyDelete
  62. Very nice Annie, thanks a lot.

    ReplyDelete
  63. This is so cool, thanks for sharing.

    ReplyDelete
  64. Thanks for the code, this really useful. What I usually do is to use the form that Wordpress gives- it already asks for the link and if you want it to be opened in a new page or not.

    ReplyDelete
  65. After a tough 4 years learning about internet marketing it is great to be able to still find useful information as there is on this blog.
    I am most impressed with the content and especially the code for the links.
    Great stuff keep up the good work.

    Steve

    ReplyDelete
  66. Images are crucial to make something worth off...

    and your post guides it..nice one!

    ReplyDelete
  67. This is just perfect blog! Thanks man, i like it, please contact me at my website...

    ReplyDelete
  68. Nice article. Now i can actually customize my site with the help of this article. I use to have a plain site and customizing it has been a problem to me. Now i know its css3 that could help me make things possible. thanks for this article..

    seen on post

    ReplyDelete
  69. Shouldnt you put in target="_blank" as an attribute in the link?

    ReplyDelete
  70. The code's really helpful. In the past I stick to pure text in Blogger because I couldn't figure out how to change it up.

    ReplyDelete
  71. Sheesh! Didn't realize that what I've been trying to do for the past hour was so easy! Thanks for the quick tutorial and the easy copy-paste.:)

    ReplyDelete
  72. Using the target="_blank" attribute opens a new window wile keeping the existing window in another tab.

    ReplyDelete
  73. This is a really useful site. I think it's great how you just give matter of fact techniques on how to use html without the extraneous opinions.

    Fantastically generous of you to make it do follow too!

    ReplyDelete
  74. this stuff is all so new to me, and when people like you come along you make everyone else's life easier! Thank you!

    ReplyDelete
  75. I tried this out and it didn't work right away but it turns out I was copying and pasting wrong. LOL didn't think I could mess up something like just copying and pasting!

    ReplyDelete
  76. Great post. Exactly what I was looking for. Following you.
    Admin
    PakLinks

    ReplyDelete
  77. Really nice tips you shared here with us.

    ReplyDelete
  78. Thanx! The code works great! And the way how to imply it is understandable even for me. Thanks one more time.

    ReplyDelete
  79. Nice tip, still learning html stuff, and this blog is great resource for that.....thanks again:)

    ReplyDelete
  80. thank you for the tips! helpful code and easy to apply!

    ReplyDelete
  81. Wow i never knew that we can do this. I tried it out, it worked out just fine...Thanks!!!!

    ReplyDelete
  82. I learned it while in school, in my computer course. This is very useful.

    ReplyDelete
  83. thanks man more tutorials to come!

    ReplyDelete
  84. Nice posting.Very informative and interesting,thanks for sharing with us.

    ReplyDelete
  85. This comment has been removed by a blog administrator.

    ReplyDelete
  86. This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. Youve got a design here thats not too flashy, but makes a statement as big as what youre saying. Great job, indeed.

    ReplyDelete
  87. I love the information you have here thank you so much!!!

    ReplyDelete
  88. Great info. I think there is also a way, using the target attribute, to open a link in a new tab when using Firefox. Simply insert target="_blank" after the URL attribute.

    ReplyDelete
  89. In title saying that open in new window, but in code no target="_blank" for the result, it will not open in new window,

    it should be

    < a href="link" target="_blank" >image link here< /a >
    [no space]

    am i wrong, correct plz.

    ReplyDelete
  90. Fantastic advice - I always wanted to do this and to give the exact code has really helped, thanks.

    ReplyDelete
  91. Thanks for the post. Great Advice. I have looked at doing this with my site.

    ReplyDelete
  92. The link is bound to open in a new window, isn't it? Well, if it's so, the anchor text should have a target="blank"

    ReplyDelete
  93. hi everybody,
    me too thinking the same what Alex shared us:

    In title saying that open in new window, but in code no target="_blank" for the result, it will not open in new window,

    it should be

    < a href="link" target="_blank" >image link here< /a >
    [no space]

    thanks indeed

    ReplyDelete
  94. thanks for the info, ıt's very useful

    ReplyDelete
  95. I will use this code on my website .

    ReplyDelete
  96. Thanks for the post. Great advice.

    ReplyDelete
  97. Thanks for the dofollow link...cheers!

    ReplyDelete
  98. Nice post...I used Job suggestion and it works fine.

    ReplyDelete
  99. Wow, this is really informative. I prefer it when a writer talks about ONE aspect of HTML vs a whole section of various features... that way when I'm searching for a specific feature (which I often do) I can find exactly what I'm looking for. Thank you. :)

    ReplyDelete
  100. having an image linked to another url and have that image go to that url when clicked used to drive me nuts.. since all coding tutorials seem to lump a gazillion bunch of tutorials at once. but not anymore. it is tutorial posts such as these certainly help a lot of "not so technology savvy" types like me.

    ReplyDelete
  101. I've been looking for a site with instructions on how to do this for a couple days now. You're instructions are the clearest and easiest to follow. Thank you!

    ReplyDelete
  102. thnx for the codings, i really needed them

    ReplyDelete
  103. well..quite useful thing. for those who didn`t knew it. :) no offence.

    ReplyDelete
  104. This code is good because it lets the visitor keep your website up in another window, instead of them moving on to another site when they click the image. Good Post!

    ReplyDelete
  105. I'm opening up a blog in a month and this would be really helpful to me. Looking forward to see more tips and information here!=

    ReplyDelete
  106. Umm..don't you think you should use target="_blank"?

    ReplyDelete
  107. Great post.. Very useful.. You're instructions are the clearest and easiest to follow Thanks for sharing this.

    ReplyDelete
  108. Thanks for the cool blog information.

    ReplyDelete
  109. Useful bit of code, thanks!

    It's important to remember to have a textual link too though....although as you said - we're not discussing that one :)

    ReplyDelete
  110. Thanks for the code. I have been looking for this for a while

    ReplyDelete
  111. Thanks a lot this help me much~
    -----------------------------------------------
    Welcome to visit http://thesc2guides.com for the sc2 guides

    ReplyDelete
  112. Good Html tips. Nice shortcut here. Thanks.

    ReplyDelete
  113. Excellent article and blog in general, added your blog to bookmark. Waiting for new articles =)

    ReplyDelete
  114. Awesome! I was trying to figure out a similar problem the other day but now I've got it licked. Great site too... I'll have to make sure to visit again.

    ReplyDelete
  115. Thanks for the code iam checking now great stuff here.

    ReplyDelete
  116. Very interesting information! Thank you!

    ReplyDelete
  117. Thanks God I find this. I have tried to image hyperlinked to open in new window many times and never succeed.

    Thanks for this info

    ReplyDelete
  118. Thank you for providing this in such an easy to understand manner. I don't have the time or energy to devote to learning a bunch of code, so your website makes it really easy to find what I need quickly and just move on!

    ReplyDelete
  119. This code is good because it lets the visitor keep your website up in another window, instead of them moving on to another site when they click the image. Good Post!

    ReplyDelete
  120. This looks actually a button control with click and command events.

    ReplyDelete
  121. very wonderful post it helps to everyone.
    try to visit our site->

    http://nitricoxidesupplementsreview.org

    ReplyDelete
  122. Thanks for the useful guides! Keep up the good work!

    ReplyDelete
  123. Thanks for the useful guides. It is really very helpful for me and hope for others also. Keep it up.

    ReplyDelete
  124. You always have some good HTML tips. Now to find a use for this particular HTML.

    ReplyDelete
  125. Thanks for this information . This is great article .

    ReplyDelete
  126. I also have had some troubles in the past about making a hyperlink image, so I went to a site that had a tutorial about it. Maybe you can check it out on Google or something. Thanks for the information.

    ReplyDelete
  127. great post, very usfull
    thank you.

    ReplyDelete
  128. This was very useful. Sites and blogs normaly give you this option but it's always nice to be able to do it yourself.

    ReplyDelete
  129. Thanks for the info post. Really helps.

    ReplyDelete
  130. Thanks you very much, wonderful news!

    ReplyDelete
  131. Great review of how to make hyperlink images. Review blogs are very helpful. I wrote a Lavia Design Review a while back. You can see it here:

    http://laviadesignreviewdotcom.wordpress.com/

    ReplyDelete
  132. This is good that you have given here for creating hyperlink image using simple example.

    ReplyDelete
  133. I am impressed with what you have done. Thanks for the great info mate, this is really helpful.

    ReplyDelete
  134. Your blog is very informative. I use a lot of your codes here and it works for me. I am looking forward for new codes from you. Hope you will come up with more....

    ReplyDelete
  135. Wow, thanks for this code. I love having readers open a link in a new window so that they eventually have to come "back" to my site once they close the window.

    ReplyDelete
  136. Good code as ever. I liked it and told my friends about it.

    ReplyDelete
  137. I just wanted to say thank you for putting up this code. It worked great fro my wifes blog. Nice of you thanks

    ReplyDelete
  138. Thanks for the code. I'm not sure I'll want to use this on my site but it's still good to know how to actually do it if I need it.

    ReplyDelete
  139. I think this looks like a hyperlink control but is actually a button control with click and command events. Thanks for this tips..

    ReplyDelete
  140. I think this looks like a hyperlink control but is actually a button control with click and command events. Thanks for this tips..

    ReplyDelete
  141. Perfect code snippet. I like the way you always get right to the point without clogging up your post with whys.

    ReplyDelete
  142. Thanks for the useful information. I am using the code you gave me, and it works perfect.

    ReplyDelete
  143. You have a wonderful and helpful blog!

    ReplyDelete
  144. Very Nice. awesome code. Thanks for sharing such useful and helpful information. Its working perfectly fine.

    ReplyDelete
  145. thanks!very usuful your information!!

    ReplyDelete
  146. - found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later.

    ReplyDelete
  147. Thanks a lot! It has always been a problem when you image opens int he same window as the reader goes away from your page and has to come back later.. if he remembers to do so.

    Thanks for the tip!

    ReplyDelete
  148. Very helpful. I have been looking for a way to open images in a new window.

    ReplyDelete
  149. I had my photos clickable but the problem is that visitors always leaving my site. with the tutorial above, at least I can now have my photos open in a new window so that my site is still on their browsers -- then visitors will not leave my site.

    ReplyDelete
  150. i always try to do this in my blog but remained away from implementation. This post is actually a great help and I owe you thanks! Having images in your post is really a plus point especially if it's linked to another site and opens up in new window.

    ReplyDelete
  151. Did I miss something? That link opened in the SAME tab. You'd need an target attribute to make it open in a different tab/window.

    ReplyDelete
  152. thanks for great tutorial very informative

    ReplyDelete
  153. Your blog is very informative. I use a lot of your codes here and it works for me. I hope you will come up with more codes.

    ReplyDelete
  154. You always provides new tips with codes to us. I really thank full for your help dear.

    ReplyDelete
  155. Hey, this is Daniel. This post will be very handy ! However, my question here is how we can use flash in the image which is to be hyperlinked ? It would be very kind of you if you could post the code for flash image as well. Thanks.

    ReplyDelete
  156. I was in GREAT need of this code. Thank you SO much!
    This is just what I needed for my own site structure (http://towncraft.net)

    ReplyDelete
  157. I have always wondered about the importance of the "title" attribute in images. I have no doubt about the "alt," but does "title" do anything at all?

    ReplyDelete
  158. Very nice tips, I have been searching about hyperlink image, thanks.

    ReplyDelete
  159. can tell me how to add scroll on site..

    ReplyDelete
  160. I was searching for this and you furnish in very few lines, thanks for sharing. I don't have the time or energy to devote to learning a bunch of code, so your website makes it really easy to find what I need quickly.

    ReplyDelete
  161. Very helpful, concise yet thorough post on getting my images to open in a new window. I'm grateful you always take the time to deliver such an effective code snippet.

    ReplyDelete
  162. I've been wanting to try this and good thing that I found this link. I'm opening up a blog in a month and this would be really helpful to me.

    ReplyDelete
  163. Thank you very much for your tip

    ReplyDelete
  164. Thank you very much your info

    ReplyDelete
  165. I also wanted to do this in my blog, thanks for sharing i will use it.

    ReplyDelete
  166. One of my friend recommend me this blog for getting such nice information and articles. And I really happy to be here.

    ReplyDelete
  167. Never thought this would be so easy! Thank you. I'll bookmark your site

    ReplyDelete
  168. Think I've been searching an hour and a half for that code. Thanks alot Annie!

    ReplyDelete
  169. thanks for sharing, great idea, was wondering my self how to do it !!! thanks for sharing

    ReplyDelete
  170. Thanks for the help I would apply this.
    But Why have you not applied in your Blog ... here!!!

    ReplyDelete
  171. Thanks for posting this code... Thank you for sharing.

    ReplyDelete
  172. Thank you for the code. I needed it too much.

    ReplyDelete
  173. Just what I needed. But could you tell me why some people think its a bad idea?

    ReplyDelete
  174. Very detailed and useful, cheers

    ReplyDelete
  175. I've been searching for how to do this for hours, yours is the only site that just gave me the code so i can copy and paste it. easy enough.

    ReplyDelete
  176. Thanks for the info. I always have trouble with certain codes.

    ReplyDelete
  177. Thanks for sharing this informative blog just for free. It is very simple and easy to follow.

    ReplyDelete
  178. Thanks for the value info..thank you very much.

    ReplyDelete
  179. I do need to make one comment. The code you created is perfect for using a picture as a link. However, the question was for the code to open the link in a NEW WINDOW. For that, the code would also need to be written as:

    a href="http://www.com" target="_blank"

    You left out the target element which needs to be set to "_blank" (as a default it is set to "_top" which opens the link in the same window)

    ReplyDelete
  180. Never thought this would be so easy! Thank you. I'll bookmark your site

    ReplyDelete

Due to,happily, a steadily increasing readership, I'm not able to answer or solve all comments/problems. I do keep track of them and answer what I can as time allows. This is my attempt to balance home and blog.

To add a link in this comment, copy and paste this code in the comment window: <a href="URL">seen on post</a>
Change URL and seen on post. For instance, to have a link to BlogU, the code would look like this: <a href="http://bloggeruniversity.blogspot.com">
BlogU</a>
To use the DOFOLLOW attribute on this blog, please remember to use the NAME/URL option when commenting rather than linking to your profile page for more exposure!