RSS

Navigation : Home / , , , / Article : How to force external links to open in new window

How to force external links to open in new window

I have seen so many blogs that are used to open external links in another windows in bloggers blog.There is an advantage of opening external links on another windows, that is your blog visitor will not leave current page as well as they visit other external links on your blog without loosing original content page.

Whenever you are trying to add new link in bloggers blog post, you have to write name and than click on link in editor.There you have to enter website URL, but the main disadvantage is that it will opens in same windows.If you are trying to add link from your blogger's post.
It is written in HTML code as shown below.

<a href="Add Link URL">Some Text</a>

If you see the HTML editor of your blog.
Now the question is that, You wish to add link in your blog post that must be open in new window,So you need to change the above code slightly.
Generally above code works for the link adding in blogger, but if you wish to add such links , that must be open in new window,Just add following code along with original code.

<a href="Add Link URL" target="_blank">Some Text</a>

target="_blank" is the specific code that is forcing link to opening in new window.

If you do not wish to add target="_blank" attribution on each link posted on your blog, you can add just one code for only one time in your blogger template so it will automatically add target="_blank with nofollow attribution on your blog, try this out SEO Script for forcing external link to open in new window

Loading

1 Response to "How to force external links to open in new window"

  1. Ron Says:

    Bhavesh,
    I spent a lot of time adding target="_blank" to links on my website. It took a lot of time and I always seemed to miss one here and there. A larger solution might be to use javascript to find and modify all external links on a page. I use jQuery to launch external links in a new browser. You can take a look at the code at Jquery External Links.
    Good Luck!

Do not add any spam messages, as we will strictly delete the spam comments, all content posted on this blog are free for use and for knowledge, do not spoil it with spamming.