{"id":993,"date":"2025-03-07T12:00:00","date_gmt":"2025-03-07T12:00:00","guid":{"rendered":"https:\/\/internship.infoskaters.com\/blog\/2025\/03\/07\/how-to-create-an-anchor-link-to-jump-to-a-specific-part-of-a-page\/"},"modified":"2025-03-07T12:00:00","modified_gmt":"2025-03-07T12:00:00","slug":"how-to-create-an-anchor-link-to-jump-to-a-specific-part-of-a-page","status":"publish","type":"post","link":"https:\/\/internship.infoskaters.com\/blog\/2025\/03\/07\/how-to-create-an-anchor-link-to-jump-to-a-specific-part-of-a-page\/","title":{"rendered":"How to Create an Anchor Link to Jump to a Specific Part of a Page"},"content":{"rendered":"<p>When I\u2019m reading a blog post or a long web page, one of my favorite things to do is jump to a specific section that I want to read first. This is made possible thanks to anchor links.<\/p>\n\n<p>Want to see what I mean? Scroll to the table of contents below. Each of the topics in the table of contents is clickable, allowing you to jump directly to that section.<\/p>\n<h3><strong><a class=\"cta_button\" href=\"https:\/\/www.hubspot.com\/cs\/ci\/?pg=a83e295a-09a5-4bc7-836a-52e0f9073453&amp;pid=53&amp;ecid=&amp;hseid=&amp;hsic=\"><\/a><\/strong><\/h3>\n<p>Pretty cool, right? The best part about it all is that it\u2018s super easy to create an anchor link yourself, even if you don\u2019t have extensive <a href=\"https:\/\/blog.hubspot.com\/website\/html\">HTML knowledge<\/a>. If the HTML-speak feels confusing, just follow along with the real-world examples below.<\/p>\n<p><em>Note: If you are a HubSpot customer,<\/em> <a href=\"https:\/\/knowledge.hubspot.com\/articles\/kcs_article\/cos-pages-editor\/how-can-i-add-an-anchor-link-in-my-email-or-page?hubs_post%3Dblog.hubspot.com\/marketing\/jump-link-same-page%26hubs_post-cta%3D%2520follow%2520these%2520instructions.\">follow these instructions.<\/a><\/p>\n<p><strong>Table of Contents<\/strong><\/p>\n<p>  <a href=\"https:\/\/blog.hubspot.com\/marketing\/jump-link-same-page#what-is-an-html-hyperlink\">What is an HTML hyperlink?<\/a><br \/>\n  <a href=\"https:\/\/blog.hubspot.com\/marketing\/jump-link-same-page#what-is-an-html-anchor-link\">What is an HTML anchor link?<\/a><br \/>\n  <a href=\"https:\/\/blog.hubspot.com\/marketing\/jump-link-same-page#external-links-vs-jump-links\">External Links vs. Jump Links<\/a><br \/>\n  <a href=\"https:\/\/blog.hubspot.com\/marketing\/jump-link-same-page#anatomy-of-an-anchor-link\">Anatomy of an Anchor Link<\/a><br \/>\n  <a href=\"https:\/\/blog.hubspot.com\/marketing\/jump-link-same-page#how-to-create-an-anchor-link\">How to Create an Anchor Link<\/a><br \/>\n  <a href=\"https:\/\/blog.hubspot.com\/marketing\/jump-link-same-page#best-practices-for-jump-links\">Best Practices for Jump Links<\/a> <\/p>\n<p><a><\/a> <\/p>\n<h2><strong>What is an HTML hyperlink?<\/strong><\/h2>\n<p>An HTML hyperlink is a clickable link that can be attached to any <a href=\"https:\/\/blog.hubspot.com\/website\/html-elements\">HTML element<\/a> 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.<\/p>\n<p>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.<\/p>\n<p><a><\/a> <\/p>\n<h2><strong>What is an HTML anchor link?<\/strong><\/h2>\n<p>An HTML anchor link, also known as a jump 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.<\/p>\n<p>A great example of this is the table of contents I mentioned above. The table of contents uses anchor links that link out to different sections of this blog post, making it easier for readers to find the exact information they\u2019re looking for.<\/p>\n<p>Allowing people to effectively \u201cjump\u201d to a certain part of a webpage can make your website content more engaging. It\u2019s also important for the user experience as it makes your content more convenient and scrollable for visitors to your site \u2014 but you have to make sure you do everything just right.<\/p>\n<p><a><\/a> <\/p>\n<p><a><\/a> <\/p>\n<h2><strong>Anatomy of an Anchor Link<\/strong><\/h2>\n<p>Creating an anchor link is simple. But it\u2019s helpful to understand which HTML elements are involved and how they all connect. These are the elements required to create an anchor link.<\/p>\n<h3><strong>1. Anchor Element<\/strong><\/h3>\n<p>The most essential HTML element of an anchor link is the anchor element tag. This is the letter \u201ca\u201d with angle brackets on either side. It looks like this: &lt;a&gt;.<\/p>\n<p>When you add the anchor element, it can hyperlink to a web page, an email address, a phone number, a file, or a section of content on the same page.<\/p>\n<h3><strong>2. Href<\/strong><\/h3>\n<p>Href \u2014 which stands for hypertext reference \u2014 is an attribute that specifies the destination of a link on a web page. An href attribute is usually added to define where the anchor link should be directed.<\/p>\n<h3><strong>3. ID Tag<\/strong><\/h3>\n<p>The id tag is an identifier that defines a unique element in the HTML. In the case of anchor links, the id is used to identify the section on the page you want to link to.<\/p>\n<p>When adding an id to your anchor link code, it should look something like this:<\/p>\n<p>&lt;a id=\u201c[idenitifier goes here]\u201d&gt;<\/p>\n<p>Want to learn more about HTML basics and CSS hacks? Download this free ebook packed with <a href=\"https:\/\/offers.hubspot.com\/html-css-hacks\">25 tangible tips and coding templates<\/a>.<\/p>\n<p><a><\/a> <\/p>\n<h2><strong>How to Create an Anchor Link<\/strong><\/h2>\n<p>Now that I\u2019ve shared the main elements that go into an anchor link, I\u2019ll show you how to create an anchor link on your webpage, step by step.<\/p>\n<h3><strong>1. Name the object or text you want to link to.<\/strong><\/h3>\n<p>In a normal linking scenario, whatever you need to link to has a URL of its own. However, in this scenario, you\u2018re not linking to a new page with its own URL \u2014 so you have to make up a name for the link\u2019s destination.<\/p>\n<p>I\u2018d recommend using a word or phrase that describes the link\u2019s destination. If you use a phrase, use underscores between each word instead of spaces, otherwise the code won&#8217;t work.<\/p>\n<h4><strong>Example<\/strong><\/h4>\n<p>Let\u2018s say I\u2019m writing a how-to blog post that\u2019s packed with examples. If I wanted to link to a specific example within the post, here\u2019s what I\u2018d use as my object\u2019s name:<\/p>\n<p>example_1<\/p>\n<p>Now, onto the next step.<\/p>\n<h3><strong>2. Insert anchor link tag.<\/strong><\/h3>\n<p>Take the name you&#8217;ve chosen and insert it into an opening HTML anchor link tag.<\/p>\n<p>In other words, replace the red section of the tag below with the name you chose in the previous step:<\/p>\n<p>&lt;a id=\u201cINSERT_YOUR_OBJECT_NAME_HERE\u201d&gt;<\/p>\n<p>In this case, I\u2019ve named my object \u201cexample 1.\u201d<\/p>\n<p>Here\u2019s how that code looks in action:<\/p>\n\n<h3><strong>3. Add opening and closing anchor link tags.<\/strong><\/h3>\n<p>Place that complete opening &lt;a&gt; tag from above before the text or object you want to link to and add a closing &lt;\/a&gt; tag after.<\/p>\n<p>Doing this sets the location of the link. This is what your code should look like now:<\/p>\n<p>&lt;a id=\u201cINSERT_YOUR_OBJECT_NAME_HERE\u201d&gt;The object you want to link to.&lt;\/a&gt;<\/p>\n<h3><strong>4. Create the hyperlink that&#8217;ll take you to that text or object.<\/strong><\/h3>\n<p>Now, go to the part of the post where you\u2018d like to have the hyperlink. You\u2019ll need to add a typical <a href=\"https:\/\/blog.hubspot.com\/website\/html-a-href\">href attribute<\/a>, which indicates the destination of the hyperlink. However, in the part where you\u2018d typically include a URL, you\u2019ll include the pound symbol (#) and then the name of the object you\u2018re linking to. Here\u2019s what it looks like:<\/p>\n<p>&lt;<strong>a href<\/strong>=\u201c#INSERT_YOUR_OBJECT_NAME_HERE\u201d&gt;Click here to see the content below.&lt;\/<strong>a&gt;<\/strong><\/p>\n\n<p>Here is how the full code should look once you\u2019re done:<\/p>\n\n<p>If you want an easy way to give this a try, try our <a href=\"https:\/\/www.hubspot.com\/products\/cms\/drag-and-drop-website-builder\">drag and drop website builder<\/a> for free.<\/p>\n<p><a><\/a> <\/p>\n<h2><strong>Best Practices for Jump Links<\/strong><\/h2>\n<p>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. Here are a few things to keep in mind when you\u2019re creating your next anchor link.<\/p>\n<h3><strong>Prioritize user experience.<\/strong><\/h3>\n<p>Anchor links are designed to improve the user experience. 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.<\/p>\n<p>Keep the user experience top-of-mind when creating anchor links. Make sure the sections you\u2019re linking to within a page make sense from a reader\u2019s point of view.<\/p>\n<p>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.<\/p>\n<h3><strong>Keep organization in mind.<\/strong><\/h3>\n<p>Anchor links can be a great way to organize a long page of content. Think about the table of contents example I mentioned earlier. A table of contents can enhance the organization of long blog posts and make it easier for readers to find what they\u2019re looking for.<\/p>\n<p>I also use jump links for glossary pages. If you have a section on your website that features hundreds of terms and definitions, adding a jump link is a great way to improve the navigation. Not only can readers skip ahead to the terms they want to learn, but jump links can help connect different terms together.<\/p>\n<h3><strong>Know when to use external links.<\/strong><\/h3>\n<p>It\u2019s important to remember the difference between a jump link and an external hyperlink.<\/p>\n<p>A jump link is a link that \u2018jumps\u2019 to a specific section of a page on your website. External links, however, are hyperlinks that direct users to a page on a different website.<\/p>\n<p>It\u2018s a best practice to create an external link when citing information from another source. Not only does this give credit where it\u2019s due, but it also helps users find more information about the subject they are reading about.<\/p>\n<p><a><\/a> <\/p>\n<h2><strong>I Learned How to Create Anchor Links With Ease<\/strong><\/h2>\n<p>If you work with website content at all, knowing how to create an anchor link is a must.<\/p>\n<p>Even if you\u2019re like me and don\u2019t have any coding experience, this is one of the easiest tricks to learn. As long as you understand how the different HTML elements work together, you can add all types of jump links to your content.<\/p>\n<p>In my experience, I can tell you that linking to a specific part of a page is a simple way to make your content more user-oriented. Jump links help readers find the information they need quicker, which ultimately helps them be more engaged with your content overall.<\/p>\n<p><em>Editor&#8217;s Note: This post was originally published in July 2014 and has been updated for freshness, accuracy, and comprehensiveness.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>When I\u2019m reading a blog post or a long web page, one of my favorite [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":994,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/posts\/993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/comments?post=993"}],"version-history":[{"count":0,"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/posts\/993\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/media\/994"}],"wp:attachment":[{"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/media?parent=993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/categories?post=993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/internship.infoskaters.com\/blog\/wp-json\/wp\/v2\/tags?post=993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}