Anchor links are used to take visitors of your website from one place on the current page to another place of the current page. One good example is if you have a long FAQ page on your website. If you have a list of the questions towards the top of your webpage they can be anchor links to the actual part of the webpage that contains that question. It becomes much easier for your visitors to click on the link instead of having to scroll through the webpage to find the specific question.

To accomplish this, you have to "name" the part of the page and then create a <a href> link to that name you created. So let's assume you have you have a FAQ page with a section on How to log into cPanel. We would name is like this in the code:

<a name="cpanel">How to Log into cPanel </a>

By assigning the anchor name or "a name" in the above code we can now reference it in our link later. Now, let's create the actual link to that specific section we named "cpanel":

<a href="#cpanel">How do I log into cPanel? </a>

Notice the actual link is using the standard <a href> tag. The difference is the actual link reference. Anchor links will always follow this format <a href="#+anchor name">. So now when someone clicks on the How do I log into cpanel link they will be taken to the reference where we placed the <a name> tag. 

If you missed our previous article, please see the Opening a new window with a link tutorial. For more information on this course please visit Inserting Links into a Website. Next we will discuss how to Hotlink or Direct link to files on the server.

Continued Education in Course 103: Inserting Links into a Website
You are viewing Section 4: Anchor Links and How to Create Them
Section 3: Opening a new window with a link
Section 5: Hotlink or Direct link to files on the server
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
2012-02-20 8:39 pm
How can I get my e mail on my site where
customers can just click the address?
Staff
9,967 Points
2012-02-21 9:40 am
Hi murphy2012,

Thanks for posting your question. I'm more than happy to assist you today. You are looking for a tag called "mailto". We have an article on it. Here's the link:

Creating an Email Link in your Webpage

If you need further assistance please feel free to contact us.

Thanks!

Tim S

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.

2 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!