Tuesday, September 26, 2006

How to make links open in new windows

Someone asked this question "How to make links open in new windows" in the comments section of this post Does making links open in new windows piss you off?. I thought it a good idea to answer in a post to make it available to more readers.

To make a hyperlink open in a new window, type it this way:
<a href="URL" target="_blank">Description</a>

NEWER POST    OLDER POST

23 comments:

  1. Just to clarify, do you hve to be in HTML mode or do you add that to the popup link box?
    The links in HTML are a bit hard to figure out, especially since I've made the BOLD and in colors so they will pop..
    I'd love to know more
    Thanks!

    ReplyDelete
  2. YAY! I figured it out! THis is like almost the best day of my life and I got popup windows too!
    THANK YOU so much :0

    ReplyDelete
  3. Anonymous12/19/2006

    Is there any way to make every link we make to be automatically formatted this way?

    ReplyDelete
  4. I think you must be referring to Blogger Beta Link List. To make links in the Link List in Blogger Beta open in new window, this post gives the method: Making links in the Link List in Blogger beta open in new windows

    ReplyDelete
  5. Anonymous12/20/2006

    hi peter! thanks for ur quick response, but I was refering to all links, not just the links in link list. I was thinking maybe you can use javascript to do that? but im not that savvy so maybe you can figure how to do this out? thank you.

    ReplyDelete
  6. Hi Uzi,

    I am sorry, I am a retired scientist, not a programmer. I don't know how that can be done.

    Peter
    Enviroman Says

    ReplyDelete
  7. Anonymous12/22/2006

    Ah, it's okay. I'll try to figure this out later:p maybe the blogger google group can help this desperate soul-_-

    ReplyDelete
  8. anyone find the answer yet? This should be a basic template modification in blogger, but for the love of god, i can't find it anywhere.

    ReplyDelete
  9. Hi Peter,

    Attribute target is not support in XHTML 1.0 Strict DTD.

    How do i make links open in new windows while supporting web standards??

    ReplyDelete
  10. Hi iake,

    I understand you have to use Javascript. I tried and failed. I don't know.

    Peter (Blog*Star 2006 and 2007)
    Testing Blogger Beta (now New Blogger)

    ReplyDelete
  11. Hello (again!);
    I tried this, and I got the error message posted below. Do you have any idea what I am doing wrong?
    The opening link list links in new windows worked perfectly for me - thank you for that.
    And thanks for any suggestions you can offer on this.

    ERROR

    Your HTML cannot be accepted: Tag is broken:

    ReplyDelete
  12. Hi British Gal,

    Don't understand the last part of your comment. Are you saying you typed the HTML for a link in a post, and when you tried to publish it, you got the error message?

    I just prepared a post in preparation for publication in Testing Blogger Beta (now New Blogger) and got I think the same message. I checked the link that was supposed to be broken and found it to be perfectly correct. Trying to save as draft failed again, so what I did was to delete the HTML for the link and type it again (to me, it looks exactly the same one that was causing an error) and this time the post saved OK. Why don't you try that?

    Peter (Blog*Star 2006 and 2007)
    Dummies Guide to Google Blogger
    "online book" in progress

    ReplyDelete
  13. Thank you very much for your suggestions. I am not sure why it didn't work, but it does now!

    ReplyDelete
  14. Thanks for posting this - I think it's annoying that Blogger doesn't have an easier option to make all hyperlinks pop up in a new window.

    Okay, so question for you. I'm not very tech savvy and I tried your solution, the code you provided, with the website taking the place of the word "Description" correct? But it didn't work. Am I doing it correct?

    Thanks again!

    Andrew

    ReplyDelete
  15. Thanks for posting this - I think it's annoying that Blogger doesn't have an easier option to make all hyperlinks pop up in a new window.

    Okay, so question for you. I'm not very tech savvy and I tried your solution, the code you provided, with the website taking the place of the word "Description" correct? But it didn't work. Am I doing it correct?

    Thanks again!

    Andrew

    ReplyDelete
  16. Please refer to Anchor text and how to make hyperlink open in new window or tab which is an expansion to this post and which I hope will make the meaning of anchor text (described as "description" in this post) very clear. Do give us feedback whether the new information is of any help to you.

    ReplyDelete
  17. Is there a way to modify the template so that every time someone opens a post or views comments to a post, it opens in a new tab?
    I don't have much idea about html(leave alone css or javascript).

    ReplyDelete
  18. No, but even if it is possible, it is not a good idea to force ALL links to open in new windows or tabs.

    ReplyDelete
  19. How can I have links on "Blog List" open up in a new window? Do I have to transfer all of them to the "link list" gadget?
    Thanks

    ReplyDelete
  20. Perhaps I should start experimenting with Blog List and Link List, but unfortunately, so far whenever I want a link to a blog or website in the sidebar, I am still sticking to the ancient HTML/Javascript gadget mainly so that I have better control over it such as make the link open in new tab or window if I so wish.

    ReplyDelete
  21. Thanks for the share. Got solution to what i was looking. Keep up the good work.

    ReplyDelete
  22. I entered the html code but now ALL my Tabs are opening in new windows too :( What did I do wrong? I only want hyperlinks in my posts, not the Blog Tabs.

    thanks!

    http://1pathtowellness.blogspot.com/

    ReplyDelete
  23. Very Helpful post . i was exactly looking for this

    regards HumourBook

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics