What are anchor links?
Anchor links are small but effective navigation points that make a webpage much more user-friendly. You can think of them as internal shortcuts that take the user directly to selected sections on the same page. Instead of having to scroll through long blocks of text, the user can click on a link and immediately land on the relevant section. This makes a particular difference on pages with a lot of text-heavy content, where you want the reader to find the desired information quickly.
In practice, an anchor link consists of two parts: the anchor itself, which marks a point on the page, and the link, which points to that point. When you click on an anchor link, the browser automatically scrolls the view down to the location of the ID. This happens without reloading the page, which both saves time and creates a more seamless experience.
In other words, anchor links make it easier to organize complex content. They help users navigate the content and allow you, as the content creator, to structure information more effectively. This applies to blog posts, product guides, and other pages where you work with content and want to ensure high accessibility.
How do you use anchor links?
You create an anchor link by combining an HTML ID and a link that references that ID. It doesn't require advanced coding, and you can do it directly in most CMS systems. In its simplest form, an anchor is an identifier that you place in your HTML code, typically on a heading or a specific location where you want the user to land.
Here is a basic example:
<h2 id="kontakt">Kontakt</h2>
<a href="#kontakt">Gå til kontaktsektionen</a>
When the user clicks the link, the view immediately scrolls down to the heading with the ID “contact.” You can use the same method if you create a table of contents that links to different sections on the page. In many cases, people choose to style anchor links with a visual cue so that the user can clearly see where they can navigate to.
If you work in digital design or UX, you can use anchor links to improve the flow of the page. When you combine this with a well-thought-out design, you help users understand the page’s structure. It also makes the content more SEO-friendly, because search engines can more easily interpret the hierarchy between sections.
That's why you should use anchor links
Anchor links create a clear navigation structure on otherwise long pages. This reduces friction between the user and the desired content, which in turn can lower the bounce rate and increase time on site. This is especially important at a time when many visitors are browsing on mobile devices and expect quick access to the most relevant information.
Anchor links are also important for SEO. They help search engines understand how content is internally linked. If you’re working on structuring content—for example, in pillar pages and topic clusters—anchor links allow you to break down the information into clear subsections. This not only improves the user experience but also helps Google index the page more accurately. When you combine this technique with a well-thought-out content strategy or a carefully crafted keyword structure, you strengthen your overall performance in search results.
Anchor links can also be integrated into your conversion optimization efforts. In a long blog post or product guide, you can use links as quick “jump points” to relevant sections, such as contact forms or CTAs. This makes navigation easy without interrupting the reading experience.
What types and varieties are available?
There are several ways to use anchor links, depending on your page's structure and goals. The most common ones are:
- Intra-page links: The classic anchor links that allow you to navigate between sections on the same page. Typically used in articles, FAQs, and tables of contents.
- Links within the site: Links that point from one page to an anchor on another page. Here, you typically use a full URL followed by a
#and the anchor's name. - Menu links: Used primarily in “one-page” websites, where the top menu jumps between sections on the same page.
Conversely, you should avoid using anchor links in emails, because many email clients automatically delete them. In this case, it's better to link directly to a web page.
How do you use anchor links in practice?
In practice, this means incorporating anchor links right from the start when you’re structuring your content. In CMS platforms like WordPress, you can assign unique IDs to your headings, which you then reference in the link. It’s a simple way to create content that’s both easy to navigate and easy for search engines to understand. In systems like HubSpot, there are dedicated tools that let you insert anchors via the editor without touching the code.
If you combine anchor links with web analytics, you can measure how users interact with them. For example, you can track which sections receive the most clicks and how that affects the user’s journey through the site. This provides insight into how you should prioritize your messages and tailor your content.
Anchor links also affect technical performance. Keep in mind that Google PageSpeed Insights may flag empty anchor tags as errors. Therefore, you should always use ID attributes instead of empty links. This helps both your SEO and the technical quality of your site.
What should you keep in mind?
Although anchor links are easy to create, they require careful consideration when used. You should choose unique IDs that aren’t repeated on the same page and ensure consistent naming conventions to avoid broken links. Also, keep in mind that too many anchor points can be overwhelming for the user, so plan the structure based on the actual information architecture.
It’s also important to test your anchor links on an ongoing basis, especially if you make changes to headings or the layout. A broken anchor link can be confusing and erode user trust. Ultimately, it’s all about creating a seamless experience where design, content, and technical setup work together—whether you’re working on SEO optimization, web design, or content production.