Skip to main content
Official website. How you know

Official websites use .gov

A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS

A lock or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Digital Design System

Jump links

Jump links help users navigate to different sections within a single page.

Overview

Usage context

When to use

Jump links should be used when a page contains three or more distinct sections and the content is too long or complex for users to digest quickly while scrolling. Types of pages where jump links make sense include:

  • Guides
  • Long articles
  • Index pages
  • About pages

Only use the jump links component for anchoring to headers on the same page as the component.


When to use something else

Don’t use jump links on short pages or pages with fewer than three distinct sections.

Never use jump links for linking to anything other than headers on the same page as the component.

Usage guidelines

Jump links should only appear in lists of three or more. 

Desktop nyc.gov screenshot showing jump links to the left of content about paying a parking ticket. The jump link header reads "Jump to section." Below are jump links for "Pay ticket" "Dispute ticket" "Check ticket status" "Frequently asked questions" and "Get help"

Desktop nyc.gov screenshot showing incorrect jump link usage to the left of content about paying a parking ticket. The jump link header reads "Jump to section." Below are two jump links for "Pay ticket" and "Frequently asked questions."

Jump link labels can break onto two lines, but never three. 

Desktop nyc.gov screenshot showing a long list of jump links. The final jump link "Contact NYC government" is displayed on two lines.

Desktop nyc.gov screenshot showing a long list of jump links. The final link "Contact the government of New York City" is displayed on three lines.

On mobile, jump links are placed directly under the page hero.

On desktop, jump links are placed to the left of the first body section below the hero.

  • Mobile nyc.gov screenshot of the "Parking or camera tickets" page showing correct jump link placement. From top to bottom, there is the H1 heading, an image, a button to "Pay ticket online," then the jump link header "Jump to section," a horizontal line, and the jump links "Pay ticket," "Dispute ticket," "Check ticket status," "Frequently asked questions," "Get help," and "Related."
  • Desktop nyc.gov screenshot of the "Parking or camera tickets" page showing correct jump link placement. The jump links are below the white hero container and to the left of the main content. The first jump link "Pay ticket" corresponds to the first H2 on the page.

Default

The Jump Links component can be utilized with a container with the jump-links class, and the following elements:

  • Header element: h2.jump-links__title
  • Unordered list: ul: The list should contain list items with anchor links (no external links)
This code is for reference only. The library is currently in beta. Check back for future releases.

Linked Content

Example section

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.

Second example section

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.

Third example section

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.

Another example section

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.

Example of a longer title for a section

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.

<div class="code-examples">

  <!-- START -->
  <nav class="jump-links">
    <h2 class="jump-links__title">Table of Contents</h2>
    <ul>
      <li><a href="#first-example">Example jump link to section</a></li>
      <li><a href="#second-example">Second example jump link</a></li>
      <li><a href="#third-example">Third example jump link</a></li>
      <li><a href="#another-example">Another example jump link</a></li>
      <li><a href="#long-example">Example of a longer title for a jump link</a></li>
    </ul>
  </nav>
  <!-- END -->
    
  <div class="example-content">
    <h2>Linked Content</h2>
    <h4 id="first-example">Example section</h4>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.</p>
    <h4 id="second-example">Second example section</h4>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.</p>
    <h4 id="third-example">Third example section</h4>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.</p>
    <h4 id="another-example">Another example section</h4>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.</p>
    <h4 id="long-example">Example of a longer title for a section</h4>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vitae urna ac neque posuere fringilla.</p>
  </div>

</div>