How to Create a Link to Jump to a Specific Part of a Page [Quick Tip]

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 jump to a specific part of a page as well.

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.

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.

How to Link to a Specific Part of a Page

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

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

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 hyperlink HTML markup, but 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

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

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

 

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *