Sunday, January 4, 2009

Blogging Tip #1-Opening Links in a New Window

I have noticed that on most blogs, whenever the blogger has included a link in their post that if you click that link you are taken to that site and leave the blog you were on.  All of us bloggers that include links because it is relevant to that post, and we think that our readers will find it interesting.  However, I for one would rather have the reader stay on my blog rather than hope they come back.  

If you would prefer to have your readers stay on your site, I have a little tip to make your links accomplish this.   All you have to do after you create your link is alter the HTML code a little bit.  Don't let that scare you.  I am no HTML expert, and it is a fairly simple change to the code to do this.  I use blogger, and I have a "Compose" tab where I write my posts, and and "Edit Html" tab where I edit my links or add my "YouTube" code.  I would assume that other blogging software will also let you do this.  

Let's take a simple link like Google.  The HTML code for this link is:
To adjust the code so that the link opens in a new window, you need to add one little thing to the code: target="_blank".  Your new html code looks like this:

Just adding that little bit of code will now cause your link to open a new window for your reader to stay on your site while reviewing the info at the link you provided.  Give it a try and let me know how it works for you.  If you have any blogging tips, feel free to post them here.


  1. Yeah, I always prefer for the link to open in a new window. If it wasn't for my techie wife, I would not have known how to do this.

  2. I only learned it when I had an online webstore with affiliate links. Did no good to have them leave my site to go to another site.

  3. Thank you for this tip. I also want my link to open in a new window but don't know how to do it until I read your post. Will try to do it later and will let you know how it works. thanks again!

  4. good luck with it. I found it to be very helpful and fairly simple

  5. this sounds too complicated to me.

  6. let me try another way. if you find the part of the code that say href= then that is the area that needs the additional code. After href would be a url in quotes ("") after the last " would be > Between the " and the > just add target="_blank" and you are set.

  7. thanks for the info.. that sounds really great.. and i have even tried it on.. and it work... that's pretty much simple.. no hassle and easy...

    thanks for sharing...

  8. you're welcome, glad it worked for you

  9. Thanks for the info. I plan to try this. I am keyboard literate ONLY -- not computer or tech literate. So, if I'm able to do it, anyone can!

  10. good luck. let me know how it goes for you

  11. Well, this is great. In fact it is exactly what I needed to know and I happened to be unwraping and eating a hersey kiss while reading and I was so intrigued that I didn't quite remove all the paper part of the kiss. :P

  12. I hate it when I don't get all the paper off the kiss. You sit there expecting something sweet and you end up having to spit out a piece of paper :-)

    Glad you like the tip.

  13. As I was saying on BlogCatalog, this works in theory but have you put yourself in that position? Hypothetically speaking, let's say you visited my page and checked out everyone on my linkroll.

    Seems to you that all the links open in a new window, a bit of an annoyance but you trust me enough and set your browser to allow pop-ups from my page. Easy enough, right?

    But much to your disappointment, every site on my linkroll has their links to open in a new tab and I'm not lying when I say that you would get annoyed very quickly.

    Well maybe not you but the majority of net users would and I assure you that target=_blank on hyperlinks is considered patronising to even the most basic web users.

    Even Granny Smith who stares at you in the face if you ask her about HTML tags will have a basic grasp of her browser's "back" button. She probably asked her grandson for help but sure, she knows how to get off a page she doesn't like.

    And what pages don't people like?

    Ones that have loads of pop-up windows.

    Common sense, innit? :)

    Btw, that's not to say that I don't use target=_blank on some of my hyperlinks because sometimes, I do. The only difference is that I follow the link with the words [link opens in new window], just to be helpful.

    Mind you, you wouldn't want [link opens in new window] all over your page either - it would get pretty ugly. So my suggestion would be this - leave the links opening in the same window and value the integrity of your visitors.

    BTW, I'm posting this because you said to wanted people to share their blogging tips here. If you disagree with my opinions, fair enough. I just know what works and what doesn't, that's all. :)

  14. Sorry you did not like the suggestion. Others found it helpful.

    In my mind, there is a big difference between clicking on a link and opening a new window to referenced content than having windows open up automatically when entering or exiting a site.

    If I click on a link, I expect to go to that site. It does not bother me to have that site open in a new window. Most of the time, when I am doing my personal browsing, I tend to right click and open in a new window or tab. All I have done is set my blog up the way that I, and others that I know, tend to browse.

    I find it much more intrusive and annoying to have new windows automatically pop up as soon as I enter or exit a site. So on that point we are in 100% agreement. I do not have those on my site.

  15. As a user it doesn't bother me whether a link opens in the same window or in a new window.

    I can right click to open in a new window if I wish, or I can just close a new window when I'm done with it. It's no big deal.


  16. Thanks John. That's how I feel. Now if a site opens a new window when I didn't click on a link, that bothers me a little.

  17. You should not use target="_blank" for accessibility reasons and in order to be more strictly compliant with the latest HTML standards.

    Web browsing should be about the web user. The decision to open a new tab or window should be the user's and not the site's, with few exceptions. Trying to force a user to spend more time on your site by making sure all offsite navigation takes place in a separate browsing sphere is condescending and - as net users become more savvy - offputting. If someone is finished with your site and clicks a link then chances are they don't want to have to close your tab or window afterwards as well. And, suppose they then do want to go back and check your site for something? Back button navigation - the core of browsing - is broken when you force a user out.

    If a user wants to open a new tab they (on PCs, FF and IE) hold down control while clicking the link. If a user wants to open a new window they (on PCs, FF and IE) hold down shift while clicking the link. Or right mouse buttons. Similar on Macs, similar with Opera, etc.

    Setting 'target="_blank"' is an outmoded method of HTML coding; you should use it about as much as you use the MARQUEE tag.

    In today's web browsing environment of multi-tabbed browsers with numerous plugins it's a big mistake to enforce your vision of what opens what and where. Remember the first rule of business: the customer is always right. Give the customer what he wants. Any business - and that includes your site - that puts its own desires of what happens above those of the people that come to it will lose out in the end.



Related Posts with Thumbnails