How Do Anchor Tags and Anchor Links Help User Experience and SEO?

ProcrustesPR

Anchor tags create links that take readers to other pages or resources, while in-page anchor links jump directly to a specific section, making them especially useful for tables of contents in long articles. Their most direct benefit is making information easier to find. Proper link markup, clear text, and well-structured content can also help search engines discover and understand a website. But easier reading does not guarantee higher rankings, and the SEO roles of in-page navigation and links between pages should be understood separately.

ProcrustesPRProcrustesPRCan a One-Page Website Do SEO?

First, distinguish between creating links and jumping to sections

The HTML anchor tag is the a element. It can be used with text or images, with href specifying the destination. Links between different pages on the same site are called internal links, while links to other websites are external links. Links to specific sections on the same page are the in-page anchor links discussed here.

For example, a long article about local SEO could assign the ID “LocalSEO” to a relevant subheading and set the corresponding table-of-contents item’s href to “#LocalSEO”. Clicking it takes readers directly to that section, without having to search through the article from the beginning. This serves a different navigation purpose from linking to a separate, comprehensive guide.

A table of contents helps readers find what they need in a long article

Semrush’s tutorial explains that a table of contents with clear, clickable anchors can provide an overview of a long article or visually dense page, helping readers decide whether it meets their needs. Nielsen Norman Group also recommends paying attention to the order of information and using interactive tools such as anchor links so users can jump to the information they need and focus on reading it.

  • A table of contents lists specific section names, helping readers understand the scope before they begin reading.
  • Descriptive subheadings and a logical H2 and H3 hierarchy make information easier to scan and locate.
  • Topics mentioned but not explained in detail can link to comprehensive guides, while related content can be recommended at the end to help readers continue exploring.

The point, then, is not how many links you add, but whether each link has a clear purpose. An in-page table of contents answers “Where is that section?” Further reading answers “Where can I learn more next?”

Distinguish crawlability, content understanding, and rankings when assessing search benefits

A 2026 Search Engine Journal report cites Google’s guidance: Google can generally crawl a elements with href attributes, but cannot reliably extract URLs from elements that rely solely on scripted click events. In other words, just because a visitor can click something to reach a destination does not mean a search engine can identify that link in the same way. Navigation should not rely solely on buttons and click events in place of actual hyperlinks.

Content structure offers a separate benefit: descriptive subheadings help search engines understand the scope of a topic, while an anchor-linked table of contents lets readers go directly to the relevant section. As for link equity, a 2021 Semrush article suggests that high-authority pages may pass equity to other pages on the same site through internal links. This concerns links between pages; it cannot simply be taken to mean that “adding a few more anchors to the same page will improve rankings,” nor should it be treated as a ranking guarantee.

ProcrustesPRProcrustesPRHow to Use a Marketing Funnel: Fill Page Gaps at Each Stage, Then Build a Conversion Path

Anchor tags and anchor links: perspectives from across the web

Besides linking to web pages, what can anchor tags make easier for readers?

Anchor tags can also make it easier to get in touch. A mailto link can open the user's default email application and fill in the recipient's address. A tel link can initiate dialing on a device that supports calling. These links save users from copying an address or number, but whether they work depends on support from the device and its email and calling applications.

Will in-page anchors make section links appear in search results?

They may, but adding in-page anchors does not guarantee that section links will appear. Semrush gives examples of how Google may display in-page anchors in search snippets, allowing searchers to go directly to relevant sections. awoo also suggests that anchors in a table of contents may increase the likelihood of sitelinks appearing. However, Google's algorithms decide whether sitelinks appear; manual setup cannot guarantee them. Adding anchors also does not guarantee higher rankings.

Is it better to pack more keywords into anchor text?

No—more keywords do not necessarily make anchor text better. Clear anchor text tells readers where a link leads, and some SEO commentary suggests that it also helps search engines assess the link's relevance. However, another SEO article cautions that placing large numbers of keyword links on external sites, in footers, or in signatures may do little to increase link equity. Anchor text should describe the destination; stuffing it with keywords does not guarantee higher rankings.

Do the underlying links still have value when content is loaded with JavaScript?

They can still be useful. One option is progressive enhancement: provide links in the HTML first, then add JavaScript to load content asynchronously. One developer shared this approach and suggested that it might also benefit users who disable JavaScript. However, this is an individual developer's experience, not a guarantee that the approach will work in every situation. To keep the page usable with JavaScript disabled, you still need to check that the underlying link destinations work.

ProcrustesPRWhat types of URLs are there, and what are they used for?

References

  1. How can I create links in javascript that are crawlable by search engines?webmasters.stackexchange.com — Discusses: Do the underlying links still have value when content is loaded with JavaScript?
  2. What Is an Href Link? 4 Best Practices You Need to Knowwww.semrush.com · 2021-06-10T17:02:00Z — Discusses: Besides linking to web pages, what can anchor tags make easier for readers?
  3. 13 Essential HTML Tags that Separate SEO Pros from the Rookiesneilpatel.com · 2024-12-12T20:00:00+00:00 — Discusses: Is it better to pack more keywords into anchor text?
  4. 什麼是反向連結? SEO一定要做外部連結嗎?www.da-vinci.com.tw · 2025-04-14T17:45:24+08:00 — Discusses: Is it better to pack more keywords into anchor text?
  5. Google’s Mueller On First Link Priority & Link Obfuscationwww.searchenginejournal.com · 2026-07-15T00:46:35+00:00 — Source used in the article above.
  6. UX Writing: Study Guidewww.nngroup.com · 2024-05-08T20:00:00+0000 — Source used in the article above.
  7. 網站連結是什麼?新手必學的 Sitelinks 實用技巧一次掌握!www.awoo.ai · 2025-02-17T08:08:32+00:00 — Discusses: Will in-page anchors make section links appear in search results?
  8. HTML Anchor Element: What Are Anchor Links & How to Use Themwww.semrush.com · 2021-10-18T20:43:00Z — Discusses: Besides linking to web pages, what can anchor tags make easier for readers?; Will in-page anchors make section links appear in search results?
  9. Will linking individual words within my content help or hinder my SEO Ranking?webmasters.stackexchange.com — Discusses: Is it better to pack more keywords into anchor text?
  10. HTML Anchor Element: A Simple Guide for Beginnerswww.semrush.com · 2021-05-19T08:59:00Z — Source used in the article above.
  11. Semantic SEO: What It Is & 10 Tips for Successwww.semrush.com · 2024-07-22T09:31:00Z — Source used in the article above.

Related articles

Can a One-Page Website Do SEO?How to Use a Marketing Funnel: Fill Page Gaps at Each Stage, Then Build a Conversion PathWhat types of URLs are there, and what are they used for?When should you use relative or absolute paths in WordPress?What are www subdomains and relative links used for?How to Create an HTML Sitemap: From Organizing Content to Publishing and UpdatingHow to troubleshoot and fix 404 errors: identify broken URLs first, then address the causeHow to improve on-site content and structure: audit pages first, then address content gaps and internal links
ProcrustesPR
ProcrustesPR