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 this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Comments

n/a Points
2015-01-14 2:57 pm

Hello Web Hosting Hub,

Hope that you can help.......

I am trying to create a link in one of my blog posts that will take my visitor to a new page with a survey that I have created in Survey Monkey. This page "Creating a Link that Opens in a New Window" seems to be the mechanism.

The survey address is https://www.******.com/s/BZD3DP5

In my case, your instructions tell me to type the following:

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

which I have done during an edit to my blog page through my Dashboard.

Unfortunately, I am just getting the text with no link as expected.

Exactly where do I have to type the text to create the link?

Many thanks Mark

 

Staff
12,339 Points
2015-01-14 5:03 pm
Hello Mark,

Thank you for your question about inserting a link in your site. I looked at your code and it is formatted correctly. Since this is HTML code, it has to be inserted into your blog as a code.

To help narrow down the steps, can you provide some additional information.

What type of CMS are you using? For example, are you using WordPress, Concrete5, Premium Web Builder, etc.?

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2017-02-22 7:41 pm

Hello! How can I extract the Moodle in cpanel and puts it at the root of the site that I am creating?

Staff
17,314 Points
2017-02-23 2:23 am
Hello Paulo,

If you are just installing it, then you need to leave the folder for installation BLANK during the installation process. It would then install Moodle into the root of your hosting account (into the public_html folder). Otherwise, you will need to migrate Moodle to the new location.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
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!
Need More Help?

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.
}