How to open a link in a new window
A serious concern of many web site owners is the fact that when guests click a link they’re taken away from their site which stops more browsing.
So how do you stop visitors leaving your website once they click a link? How do you create a link that will open in a new window or tab?
Fortunately, this is a relatively easy issue to resolve. If you have access to editing the html of your site then it’s just a matter of adding a target=”blank” to the html code for the link as in the instance below.
Example 1: Making a link attached to a graphic or banner open in a new tab or window
<a href=”http://www.mysite.com” target=”blank”> <img src=”http://www.mysite.com/images/banner.jpg”> </a>
This will create one thing like this
![]() |
Example 2: Forcing text links to open in a new tab or window
<a href=”http://www.mysite.com” target=”blank”> my link here </a>
Will form a link like this:
Whether these links open a new window or browser tab depends on the visitors browser settings. But whichever it does, your site will still be open in their browser for them to come back to.
It should be noted that Google does not allow the code in adsense units to be altered. Therefore it is unavoidable that people leave your site if they click a Google link. If you alter this code Google will disallow ALL clicks and probably shut your adsense account and ban you from ever signing up again.
Any other link could be opened in separate windows or tabs by following the instructions above.
