How to Create a Link to Jump to a Specific Part of a Page

Learn More About HubSpot's Free CMS Software
Ginny Mineo
Ginny Mineo

Updated:

Published:

When most people think of hyperlinks, they think of connecting two different web pages — such as a blog and landing page — together. But that's not all hyperlinks can do, they can link to a specific part of a page as well.

business person excited to learn how to create a link to a specific part of a page

So remember that really exhaustive glossary you put together on industry terms your audience should know? Now, when you refer to something you said elsewhere in that article, you can actually link to it — making it much easier for your audience to figure out what the heck you're talking about. Want to see what I mean? Just click here.

Build your website with HubSpot's Free CMS Software

Pretty cool, right? The best part about it all is that it's super easy to do yourself, even if you don't have extensive HTML knowledge. If the HTML-speak feels confusing, just follow along with the real-world examples below.

Note: If you are a HubSpot customer, follow these instructions.

HubSpot's Free Website Builder

Create and customize your own business website with an easy drag-and-drop website builder.

  • Build a website without any coding skills.
  • Pre-built themes and templates.
  • Built-in marketing tools and features.
  • And more!

What is an HTML hyperlink?

A hyperlink is a clickable link that can be attached to any HTML element on a webpage, such as an image or text. These links can be used to direct users to other pages within your site, external websites or even specific parts of a webpage.

Hyperlinks are created by using HTML code, which is the language used to structure your website. Strategically utilizing hyperlinks can help you enhance the user experience on your website by guiding users through your content and help them discover related information.

What is an HTML anchor link?

Also known as a jump link, an HTML anchor link is the link that takes you to a specific part of a webpage. Anchor links are especially helpful for guiding users through a long page. For instance, you could create a table of contents at the top of your page by using anchor links that link out to different sections of your blog post, making it easier for users to find the exact information they are looking for.

It's a best practice to create an external link when citing information from another source. Not only does this give credit where it's due, but it also helps users find more information about the subject they are reading about.

Allowing people to effectively "jump" to a certain part of a webpage can help your business grow better and make your content more convenient for visitors to your site — but you have to make sure you do everything just right. Here's how to add jump links to your content, step-by-step.

1. Name the object or text you want to link to.

In a normal linking scenario, whatever you need to link to has a URL of its own. However, in this scenario, you're not linking to a new page with its own URL — so you have to make up a name for the link's destination.

I'd recommend using a word or phrase that describes the link's destination. If you use a phrase, use underscores between each word instead of spaces, otherwise the code won't work.

Example

Let's say we wanted to link to an example of a company using Facebook ads in a post. Here's what I'd use as my object's name:

facebook_ads_example

Now, onto the next step.

2. Take the name you've chosen, and insert it into an opening HTML anchor link tag.

In other words, replace the red section of the tag below with the name you chose in the previous step:

<a id="INSERT_YOUR_OBJECT_NAME_HERE">

Example

 

<a id="facebook_ads_example">

3. Place that complete opening <a> tag from above before the text or object you want to link to, and add a closing </a> tag after.

Doing this sets the location of the link. This is what your code should look like now:

<a id="INSERT_YOUR_OBJECT_NAME_HERE">The object you want to link to.</a>

Example

 

<a id="facebook_ads_example">This is the Facebook ad example I want to link to.</a>

4. Create the hyperlink that'll take you to that text or object.

Now, go to the part of the post you'd like to have the hyperlink in. You'll need to add a typical href attribute, which indicates the destination of the hyperlink. However, in the part where you'd typically include a URL, you'll include the pound symbol (#) then the name of the object you're linking to. Here's what it looks like:

<a href="#INSERT_YOUR_OBJECT_NAME_HERE">Click here to see the content below.</a>

Example

 

<a rel="noopener" target="_blank" href="#facebook_ads_example">Click here to see an example of how a company uses Facebook ads.</a>

And then you're all set — you have a functioning hyperlink between two pieces of content on the same page. Simple as that.

Why create anchor links to jump to a specific part of the page?

Even though creating anchor links adds a few more steps to your process before publishing a blog post, it can make a big impact on user experience.

Anchor links can be used to create features like table of contents, which can enhance the organization of long blog posts.

Creating links that take you to a specific part of the page makes it much easier for users to navigate through your content and find the information they are looking for. Without the assistance of anchor links, users may end up scrolling through the page for a long time, which could lead them to bounce.

Ultimately, your customers will appreciate skimmable, easy-to-read content and may be more likely to revisit your site or make a purchase because of it.

Create Anchor Links With Ease

Linking to a specific part of a page is a simple way to make your content more user-oriented. In just a few short steps, you can create anchor links that make navigating long blog posts a piece of cake.

(Hey there, curious folks from the introduction! Click here to go back to where you left off.)

Editor's Note: This post was originally published in July 2022 and has been updated for freshness, accuracy, and comprehensiveness.

content hub

Related Articles

A free suite of content management tools for marketers and developers.

LEARN MORE

The weekly email to help take your career to the next level. No fluff, only first-hand expert advice & useful marketing trends.

Must enter a valid email

We're committed to your privacy. HubSpot uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our privacy policy.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.