How to create a hyperlink that jumps from a word on a web page to part of another page

Christian Jacques Bennett Blog

If, like me, you are a visual learner you may just want to skip all of the written explanation and jump down below to the images. Here is an anchor hyperlink to do just that CLICK HERE TO JUMP DOWN NOW!

1. This is how you link from one part of a web page to another part of the same page:

<h1 id="ANCHOR1">This text in between the "h1" tags will act as an anchor where the below link will always jump to.</h1>

<a href="#ANCHOR1">This text when clicked will go to the text highlighted by the "id" named ANCHOR1 above</a>

2. This is how you link from one part of a web page to another part of a completely different web page on the same website domain:

First of all, you must add the anchor code to the place of the page you want a link to jump to. Here it is again:

<h1 id="ANCHOR1">This text in between the "h1" tags will act as an anchor where the unique named "ANCHOR" link will always jump to.</h1>

NOTE! YOU MUST ENSURE THAT YOU USE UNIQUE / DIFFERENT ANCHOR NAMES FOR DIFFERENT PARTS OF A WEB PAGE! For example, you could use "ANCHOR1" for a word at the top of a page and "ANCHOR2" for a word at the bottom of a page.

Once you have placed the correct unique anchor ID inside of any html brackets code* you can then create the hyperlink to go to a different page.

*For example, besides "h1" tags you can also add an ID="ANCHOR" within "h2" "h3" or even script and bold tags. The main thing is that you are telling the hyperlink where on the website you want it to go to.

Let's say for example you have placed the id=ANCHOR1 code on a website page URL as follows:

To link to the anchor part of that one page you would need to use the hashtag "#" symbol as follows:

Note how after the hashtag you must add the unique anchor name you have chosen.

Once you have that link you can simply highlight any other part (word or phrase etc) of a web page and add a hyperlink using that link.

Here are images of what I have just said:

Christian Jacques Bennett Blog
Christian Jacques Bennett Blog

Hope this has helped you get your head aroud anchor tags and hyperlinking from one part of a web page to another.

Author: Christian Jacques Bennett*

Socially Discuss - or add a comment below

Search Terms: HTML, code, tips, website, marketing, linking, CSS, programmer, web, developer, web.

Image by StockSnap from Pixabay


💬 Make a comment and promote* yourself for FREE. How? When you comment you can choose to add a name and website link for readers to click to - OR - you can comment using your Google profile which contains all your key info. But if you are feeling shy don't worry, you can comment anonymously (no name). Also note, simple html code will work in comments too (hyperlinks, font properties etc). The rules are to be kind and honest. No spamming or bullying accepted.

  1. Been looking for an easy explanation like this for ages. Thanks

  2. You are a life saver, I tried other websites but their explanation was so complicated. Thanks C

  3. Perfect. Bookmarked this page as I always forget how to do this.

Previous Post Next Post