Friday, October 16th, 2009 | Author: J.R.

Links are one of the most important parts of a website. They allow for your visitors to get from one location of your site to another with relative ease. So, what should be done if you want some of your links to open in a new browser window? Simply by adding a short piece of code within the HTML of the link, this problem can be easily solved.

The basic HTML structure of a link looks like this:

<a href=”http://another-site.com”>Example Link</a>

When clicked, the above link would open another-site.com in the same browser window that was currently being used. If we wanted that same link to open in a new browser window, we would need to add a short piece of code (target=”_blank”) to the above link.

The updated HTML for the link would now look like this:

<a href=”http://another-site.com” target=”_blank”>Example Link</a>

Now if a visitor were to click on the link, a new browser window would open and another-site.com would be displayed within the new window. If the visitor were to close the newly opened window, your site would still remain open on their screen.

If the link is to an external website, then it is very important that the page opens in a new window so that the visitor does not click completely away from your website. This way the visitor remains on your site, and does not have to click the ‘back’ button to revisit your site.

 

If you would like to be kept up to date with web design news, trends and reviews then visit our web design blog.

Related posts:

  1. Getting Visitors and Links the Jonathan Leger Way It’s rare that I don’t see that or a...
  2. Logitech QuickCam Pro 9000 Open A New Window To The Web As Internet connections have matured to faster and faster...
  3. Why Search Engine Marketing Is So Important Having a website up on the internet does not...
  4. Using Google Adwords To Drive Targeted Traffic To Your Site When you have a website, you will undoubtedly want...
  5. What Every Homeowner Should Know about BamBoo Roman Shades and Other Window Treatments Either it’s the bathroom, the living room, bedroom or...

Category: All Set
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.