Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

Accept all cookies

Anchor Links: How to Create Jump Links in HTML and Your CMS, and What They Do for SEO

What an anchor link is, how to create one in HTML, WordPress, Shopify, Webflow or Wix, its SEO benefits, and how it differs from anchor text (link text).

Published on:
10/10/2026
-
Updated on:
10/10/2026
Computer screen showing a long web article with a table of contents on the side, illustrating anchor links that jump to a section of the page

Tools

Thibault Besson-Magdelain, founder of Sorank

About Author

Thibault Besson-Magdelain

Founder of Sorank, 7+ years of experience in SEO, GEO enthusiast.
On this page

In short

An anchor link is a link that sends the reader to a specific section of a page, using a fragment such as #pricing that points to an element with the matching id. You create one in two steps: give the target heading an id, then link to it with href="#that-id". Their SEO effect is indirect: they power tables of contents, can earn "jump to" links in Google results and make long pages easier to use. They should not be confused with anchor text, the clickable words of a link.

Want to go further? Ask

An anchor link, also called a jump link or a link anchor, is one of the oldest features of HTML and one of the most useful on long content. It lets a reader skip to the answer they want instead of scrolling. Google itself treats links as a core signal of how pages relate, and its link best practices stress that links must be real a elements with an href. This guide shows how to create anchor links in plain HTML and in the main CMS, what they do for SEO and for AI answers, and how they relate to anchor text.

An anchor link is a hyperlink whose destination is a location inside a page. The URL ends with a hash sign followed by an identifier, called a fragment: example.com/guide#step-3. When someone clicks it, the browser loads the page (or stays on it) and scrolls to the element whose id is step-3.

There are three common uses:

  • Same-page navigation: a table of contents at the top of an article, or a "back to top" link.
  • Deep links from another page: linking from one article to a precise section of another, for example a definition in a glossary.
  • Sharing a precise passage: sending a colleague straight to the paragraph that answers their question.

Search engines treat example.com/guide and example.com/guide#step-3 as the same page. The fragment never creates a new URL to index, so anchor links cannot cause duplicate content.

Two pieces of code are enough: an id on the destination and a link pointing to it.

  1. Add an id to the target: <h2 id="pricing">Pricing</h2>. Use lowercase letters, numbers and hyphens, with no spaces, and keep each id unique on the page.
  2. Link to it on the same page: <a href="#pricing">See pricing</a>.
  3. Link to it from another page: <a href="/guide#pricing">Pricing section of the guide</a>.
  4. Test it: click the link, check that the heading appears at the top of the screen and is not hidden under a fixed header (the CSS property scroll-margin-top fixes this).

The old method, <a name="pricing"></a>, still works in browsers but is obsolete in HTML5. Use id on the heading itself. A related feature, text fragments, lets a link highlight a passage without any id, with the syntax #:~:text=, as documented by MDN. Google uses this mechanism when it scrolls visitors to the passage quoted in some featured snippets.

Every major CMS lets you set an id without touching the template. The field name changes from one tool to the next.

CMSWhere to set the idHow to link to it
WordPress (block editor)Select the heading block, open Advanced, fill in "HTML anchor"Insert a link and type #your-id
ShopifySwitch the rich text editor to HTML view and add id="your-id" to the headingLink to #your-id in the same view
WebflowSelect the element, open Element settings, fill in the ID fieldLink settings, choose "Page section" or type #your-id
WixAdd an anchor from the Add panel and name itLink a button or text to that anchor
Plugins and themesMany table of contents plugins create ids from headings automaticallyThe plugin builds the links

If your CMS generates ids automatically, check them: some create ids from the full heading text, which produces long, unstable fragments that break when you edit the title.

Anchor links are a usability feature first. Their SEO value is indirect, but it is real on long content:

  • "Jump to" links in results: on long, well-structured pages, Google sometimes shows links to sections under the result, which can lift visibility and clicks. Google decides when to display them.
  • Better passage matching: clear headings with ids help search engines and AI assistants identify a precise answer inside a long page, the same logic that wins featured snippets.
  • Engagement: a table of contents lets readers reach the part they need, instead of leaving to find it elsewhere.
  • Accessibility: skip links and in-page navigation help keyboard and screen reader users, a principle covered by the W3C accessibility guidelines.
  • Precise internal links: pointing to #definition in another article sends readers to the exact passage, which strengthens your internal linking.

What anchor links do not do: they do not pass extra authority to a page, since a link to page#section counts as a link to the page, and they do not replace good content. One technical warning comes straight from Google's JavaScript SEO basics: do not use fragments to load different page content, because Googlebot cannot reliably resolve those URLs. Use fragments only to scroll within content that is already on the page.

The two terms are close and often mixed up. An anchor link is about where a link goes (a section). Anchor text is about what the link says (the clickable words). Our glossary entry on anchor text covers the second topic in depth.

CriterionAnchor linkAnchor text
DefinitionA link to a section of a page, via #idThe visible, clickable text of any link
Examplehref="#pricing""see our pricing"
Main roleNavigation and user experienceTells users and search engines what the target is about
SEO effectIndirect (jump links, passages, engagement)Direct relevance signal for the target page
Main riskBroken ids, content loaded through fragmentsOver-optimized exact-match anchors on backlinks

Every anchor link also has anchor text, so the two sets of rules apply together.

  • Short, readable ids: #pricing, #how-to-install, rather than #section-1 or a 12-word fragment.
  • Descriptive link text: Google recommends text that is descriptive, reasonably concise and relevant, and advises against generic wording such as "click here".
  • A table of contents on long pages: above roughly 1500 words, list the H2 sections at the top, each linked to its id.
  • Question headings: headings phrased like the questions people ask make the jump links more useful and easier to quote.
  • Stable ids: do not change an id after publication if other pages or sites link to it.
  • Check the structure: an heading structure analyzer shows whether your H2 and H3 levels are clean before you add anchors.

What mistakes should you avoid?

  • Duplicate ids: two elements with the same id make the link jump to the first one only.
  • Hidden targets: a heading inside a closed tab or accordion may not be reachable by the link.
  • Fixed headers covering the heading: add scroll-margin-top in CSS.
  • Fragment-based routing: single-page apps that change content with #/page URLs are hard for Google to crawl.
  • Over-optimized anchor text: repeating the same exact keyword in every link reads as manipulation.

Conclusion

An anchor link sends readers to a precise section of a page through a #id fragment. Create it by adding an id to the heading and linking to it, in HTML or through your CMS settings. Its benefits for SEO are indirect but concrete on long content: tables of contents, possible jump links in Google, clearer passages for AI answers and better internal links, as long as the anchor text stays descriptive. If you would rather not structure every article by hand, Sorank, our SEO and GEO software in autopilot, writes structured articles with question headings and internal links and publishes them on your CMS: see the AI blog article generator and try it with a 3-day free trial.

Frequently asked questions

What is an anchor link example?

A typical example is a table of contents entry labeled Pricing whose link points to #pricing, which scrolls the reader to the heading that carries the id pricing. From another page, the same section is reached with a URL such as example.com/guide#pricing.

Are anchor links good for SEO?

They help indirectly. On long, well-structured pages they can earn "jump to" links in Google results, make precise passages easier to identify for featured snippets and AI answers, and improve navigation. They do not pass extra authority and do not create new indexable URLs.

What is the difference between an anchor link and anchor text?

An anchor link points to a section of a page through a fragment like #pricing. Anchor text is the visible, clickable wording of any link, and it tells users and search engines what the destination is about. Every anchor link has anchor text, so both sets of best practices apply.

Our Blog for Ambitious Company

Our free SEO tools

See all our free tools

THEY TRIED SORANK BEFORE YOU

Testimonials from ambitious founders

Organic growthE-commerce

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.fr
Organic growthSoftware

0 to 5000 clients in 8 months

Thibault BMsorank.com
Organic growthLeisure and aviation

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.com
Organic growthMusic software

x30 clicks in 4 months

Valentin Cordiertiger-sounds.com
Organic growthHealth and wellness

x30 clicks in 4 months

Rodrigue Bretonalthevia.com