Now that we have gone over how to create a basic hyperlink in HTML and covered how to create mailto tags to send email. Sometimes you may want to create an external link to websites. To do this, you may not want your visitors to leave your website but just open a new web browser window with the new link. That way, your visitors do not have to navigate back to your website, they can simply close the web browser window when they are done reviewing your external link.

We will use the link below to make  basic hyperlink:

<a href="/support/nextpage.html">Click here for the next page </a>

The basic form will remain the same however a few things will change. Since we're creating an external link to a website we will need to edit the link in the code. When referencing an external link, you will need the http:// in front of the full URL.

<a href="http://www.separate-domain.com">Click here for  the next page</a>

Now, since we have updated the URL the link will go to, when a visitor click on the link it will take them to the new site but in the same window. To change this, and have a new window open we will use the "target" attribute. To open a page in a new window, we will use the target="_blank" attribute. So now if we add the to the above code, it will look like this:

<a href="http://www.separate-domain.com" target="_blank">Click here for the next page</a>

This will now open the link in another browser window. You can change the text to whatever you would like at this point. 

Please check the next article on Anchor Links and How to Create Theme. If you missed our previous article, please see the Creating an Email Link in your Webpage tutorial. For more information on this course please visit Inserting Links into a Website

Continued Education in Course 103: Inserting Links into a Website
You are viewing Section 3: Opening a new window with a link
Creating an Email Link in your Webpage
Anchor Links and How to Create Them
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!

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!
Ask a Question

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.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

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

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!