A jump link is a same-page hyperlink that scrolls the browser to a specific section by matching a URL fragment (the part after the #) to an element’s id — no page reload, no new request. They power table-of-contents navigation, FAQ “jump to answer” patterns, and deep-linkable sections in long-form pages. Done right, they make a 3,000-word page feel like a navigable app; done wrong, they bury your target under a sticky header and break screen-reader announcements.
Jump Link (Same-Page)
A jump link is a hyperlink that uses a URL fragment to scroll the browser to an element with a matching id on the same page, enabling instant in-page navigation without a reload.
How Jump Links Actually Work
The mechanism is older than CSS and dead simple. You give a target element an id, then point an anchor at that id prefixed with #:
<!-- The link -->
<a href="#pricing">Jump to pricing</a>
<!-- The target, anywhere on the same page -->
<section id="pricing">
<h2>Pricing</h2>
...
</section>
When the link is activated, the browser does three things in order:
- Locates the element whose
idmatches the fragment. - Scrolls the page so that element’s top aligns with the viewport (by default, an instant jump).
- Updates the address bar to
...#pricingand pushes a history entry, so back/forward works.
That last point matters more than people think: because the URL changes, anyone can copy that fragment URL and land directly on the section. Jump links are the cheapest deep-linking you’ll ever ship.
The named-anchor
<a name="x">syntax is dead. It was deprecated in HTML5. Always target an elementidinstead — it’s cleaner, works on any element, and is what every modern tool expects.
The same-origin, same-page rule
Fragments only act on the page you’re already on. A link to /blog/post/#section-3 from a different page tells the browser: load that page, then scroll to #section-3. Within the same page, no request fires at all — it’s pure client-side scrolling. That’s why jump links feel instant and never count as a pageview unless you instrument them yourself.
Fixing the Sticky-Header Problem
The single most common jump-link bug: a sticky header eats the top of your target. The browser scrolls the element to viewport-top, but your fixed nav is also at viewport-top, so the heading disappears underneath it.
The modern fix is one line of CSS — no JavaScript required:
:target {
scroll-margin-top: 6rem; /* match your sticky header height */
}
/* Or apply globally to all headings */
h2, h3 {
scroll-margin-top: 6rem;
}
scroll-margin-top (and its shorthand scroll-margin) reserves space above the target during fragment scrolling. It has near-universal browser support and replaces every hacky invisible-spacer or negative-margin trick from the jQuery era. If you need it page-wide regardless of which element is targeted, scroll-padding-top on the scroll container does the same job from the other side.
Smooth Scrolling Without Breaking Accessibility
Native fragment jumps are instantaneous. If you want the animated glide, you’ve got a one-liner:
html {
scroll-behavior: smooth;
}
/* Respect users who get motion sickness */
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
}
Never ship smooth scrolling without that prefers-reduced-motion guard. Vestibular disorders are real, and forcing animation is an accessibility failure that automated audits will flag.
For programmatic control, scrollIntoView is cleaner than calculating offsets by hand:
document.querySelector('#pricing').scrollIntoView({
behavior: 'smooth',
block: 'start',
});
The focus trap nobody handles
Here’s the part most implementations get wrong. Scrolling moves the visual viewport, but it does not move keyboard focus or tell a screen reader anything happened. A screen-reader user clicks “Jump to pricing” and… nothing is announced. Their virtual cursor is still up top.
The fix is to make the target focusable and move focus to it:
const target = document.querySelector('#pricing');
target.setAttribute('tabindex', '-1'); // focusable, not in tab order
target.focus();
target.scrollIntoView({ behavior: 'smooth' });
tabindex="-1" makes the element programmatically focusable without adding it to the natural tab sequence. After focus(), the screen reader announces the heading, and subsequent Tab presses continue from the right place. This is the difference between a jump link that looks fine and one that actually works for assistive tech — and it’s exactly the kind of detail our growth program bakes into technical QA.
Jump Links and SEO: What’s Real, What’s Myth
Let’s kill the biggest misconception first: a fragment does not create a separately indexed URL. Google treats /page/ and /page/#section as the same canonical URL. You will not rank a fragment as its own listing.
What jump links can do is earn you a “Jump to” sublink in the search result. When Google understands your on-page anchors and headings, it sometimes surfaces section links directly in the SERP for long pages — letting searchers land deep inside your content. This is adjacent to how featured snippets and other SERP features reward well-structured pages, and it’s increasingly relevant in the AI Overviews era, where Google synthesizes answers from clearly demarcated sections and cites the passage it pulled from.
| Claim about jump links | Reality |
|---|---|
| Fragments rank as separate URLs | False — they share the parent page’s canonical |
| Jump links pass extra “link equity” internally | No — same-page anchors don’t redistribute PageRank |
| Good anchors can produce SERP “jump to” sublinks | True — clear ids + semantic headings help |
| Hiding section content behind JS is fine | Risky — keep indexable content in the initial HTML |
| Smooth scroll helps rankings | No direct effect; it’s a UX/engagement signal |
The defensible SEO value is indirect: better scannability, lower pogosticking, and stronger dwell time because users find what they came for instead of bouncing. Pair jump links with proper header tags and a single H1 tag per page, and you reinforce the topical structure crawlers already use to understand the page.
Implementation checklist
- Unique, descriptive
ids —id="pricing-plans", notid="section-2". Start with a letter, use hyphens, no spaces. - Server-rendered targets — make sure
ids exist in the initial HTML, not injected by client-side JS after load. - Semantic headings — wrap each anchored section in an
<h2>/<h3>that matches the link text. - Scroll offset —
scroll-margin-topto clear sticky headers. - Focus management —
tabindex="-1"+focus()for screen readers. - Reduced motion — guard smooth scrolling behind
prefers-reduced-motion. - Keep content visible — don’t lock indexable text behind interactions Googlebot won’t trigger; relevant to your crawlability story.
- Track clicks — fire an analytics event so jump-link usage shows up in your digital marketing analytics.
When To Use Jump Links (And When Not To)
Reach for jump links when the page is genuinely long and users have distinct intents: a table of contents on a 3,000-word guide, a “jump to answer” on an FAQ, deep specs on a product page, or section links on a pillar page. They shine anywhere you’d otherwise force scrolling fatigue.
Skip them on short pages — a jump link to a section two screens down is theater, not navigation. And don’t confuse same-page jump links with site-wide navigation patterns like breadcrumbs; jump links move within a page, while breadcrumbs and internal links move between pages and shape your site structure.
Frequently Asked Questions
What is the difference between a jump link and an anchor link?
There is none — “jump link,” “anchor link,” and “fragment link” all describe the same thing: a hyperlink that uses a #fragment to scroll to an element with a matching id on the same page. “Anchor link” is the older term from the deprecated <a name> syntax; “jump link” is the plain-English version.
Do jump links help SEO?
Not directly. Fragments don’t create separately indexed URLs and don’t pass internal link equity. The benefit is indirect: clearer structure can earn “Jump to” sublinks in search results, and better scannability improves dwell time and reduces pogosticking — engagement signals that support, but don’t guarantee, rankings.
How do I stop my jump link target hiding under a sticky header?
Add scroll-margin-top in CSS to the target element (or to all headings), set to roughly your sticky header’s height — for example scroll-margin-top: 6rem;. This reserves space above the element when the browser scrolls to a fragment, so the heading lands below your fixed nav instead of underneath it. No JavaScript needed.
How do I make jump links accessible for screen readers?
Scrolling alone doesn’t move keyboard focus, so screen readers announce nothing. Give the target tabindex="-1", then call .focus() on it after scrolling. That makes the element programmatically focusable, announces the new section to assistive tech, and ensures the next Tab press continues from the correct place.
Can I link to a specific section from another page?
Yes. Append the fragment to the destination URL — https://example.com/guide/#pricing. The browser loads the page, then scrolls to the element with id="pricing". This is the cheapest form of deep linking and works in shared links, emails, and internal links, as long as that id exists in the page’s rendered HTML.