If you have a link on your website that goes to a different website, then you will want the page to open in a new window.  By having the page open in a new window, your visitor will not leave your website and can easily go back to it once they are done at the site that you linked to.  This is a great way to keep visitors on your website when you want to have a link to a different site.

For reference, this is the same HTML code we used in a previous section to make a hyperlink:

<a href="/help/nextpage.html">Click here to go to my next page</a>

The basic form is the same, but we need to change a few things.  First, we will change the link that the text is pointed to.  When a link is pointed to your own site you only need the name of the file on your server, but if you are pointing the link to a different website then the full link is needed with the http://.  For example:

<a href="http://www.differentwebsite.com">Click here to go to my next page</a>

If you used the link as we have above, it would go to the new website, but it would stay in the same window and take your visitor away from your site.  To change this, we can change the "target" of the link.  The target attribute allows you to tell the page where to open the new link.  To open the page in a new window, we will use the target attribute _blank.  As it sounds, this tells the link to open in a blank page, instead of of the same page.  It will look like this:

<a href="http://www.differentwebsite.com" target="_blank">Click here to go to my next page</a>

Now we will just change the text of the link:

<a href="http://www.differentwebsite.com" target="_blank">Click here to visit a different site with more information!</a>

And you have created a link that will open in a new window!

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Help Center:
Email Address
Optional, but our team may contact you for more information.
Did you find this article helpful?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.