Skip to main content
U.S. Flag

An official website of the United States government

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.

CMS Design System

    • For developers
    • Child Design Systems
    • Accessibility
    • Design Principles
    • Browser Support
    • Print guidelines
      • Layout Grid
      • Breakpoints
    • Base
      • Headings
      • Body
      • Links
      • List
    • Color
    • Spacing
    • Components overview
    • Accordion
    • Alert
    • Autocomplete
    • Badge
    • Button
    • Card (M.gov)
    • Checkbox
      • Calendar Picker
      • Multi Input Date Field
      • Single Input Date Field
    • Drawer & Help Drawer
    • Dropdown
    • Filter Chip
      • Healthcare.gov Footer
      • Medicare.gov Footer
    • Form Label & Legend
      • Healthcare.gov Header
      • Medicare.gov Header
    • Icon
    • Idle Timeout
    • Inset (HC.gov)
      • Healthcare.gov Logo
      • HHS Logo
      • Medicare.gov Logo
    • Masked Field
    • Modal Dialog
    • Month Picker
    • Pagination
    • Radio Button
    • Review
    • Skip Nav
    • Spinner
    • Stars (M.gov)
    • Step List
    • Table
    • Tabs
    • Text Field
    • Tooltip
    • USA Banner
    • Vertical Navigation
    • Patterns overview
      • Forms
      • Form validation
    • Phone numbers
    • Third Party External Link
    • Utilities overview
      • One Column Page Layout
    • Documentation Page
    • Utilities overview
    • Background Color
      • Border Radius
      • Border
    • Display
    • Flexbox
    • Float
      • Font Family
      • Font Size
      • Font Style
      • Font Weight
    • Margin
    • Overflow
    • Padding
      • Line Height
      • Measure
      • Text Alignment
      • Text Color
      • Text Decoration
      • Text Transform
      • Truncate
      • Word Break
    • Vertical Align
    • Visibility
    • Migrating to v4 buttons
    • Migrating to v2
    • Using agnostic typography classes

What's new?

View code on GitHub

Links

Links connect users to a different page or further information.

GithubStorybook logoStorybookSketch logoSketch

  • Examples
    • On light background
    • On dark background
  • Code
    • Styles
  • Guidance
    • When to use
    • When to consider alternatives
    • Accessibility

Have ideas?

  • Contact the team
  • Start a discussion on GitHub
  • Edit this page
Notice:

Typography sizing updates!

We've updated typography sizing variables and class names to make them more agnostic. Read about how you can update.

Examples

The only base HTML element the design system applies styling to is the <a> element. You can also use .ds-c-link and .ds-c-link--inverse for styling links.

On light background

This is a text link on a light background.

This is a visited link.

<p>
  <a href="javascript:void(0);">This is a text link</a>
  on a light background.
</p>
<p>
  <a href="https://design.cms.gov/">This is a visited link</a>
  .
</p>

On dark background

This is a text link on a dark background.

This is a visited link on a dark background.

<div class="ds-base ds-base--inverse ds-u-padding--1">
  <p>
    <a href="javascript:void(0);">This is a text link</a>
    on a dark background.
  </p>
  <p>
    <a href="https://design.cms.gov/">This is a visited link</a>
    on a dark background.
  </p>
</div>

Code

Styles

The following Sass variables can be overridden to change the type sizes:

  • $font-size-5xl
  • $font-size-4xl
  • $font-size-3xl
  • $font-size-2xl
  • $font-size-xl
  • $font-size-lg
  • $font-size-md, uses $font-size-base
  • $font-size-sm

Guidance

Your link should always describe where it will take users. Users tend to scan text online, and elements that stand out (like links) grab attention. Clear links can help users navigate more quickly.

For example, instead of:

Learn more

Use:

Learn how to reset your passphrase

Never use a link to say “click here.” A nondescript link forces users to backtrack and read the surrounding text for more context. This is even more problematic for those who rely on screen readers, which can list links for quicker navigation. A list of “click here” isn’t helpful for anyone.

When to use

  • Navigating to a new page or view in your application
  • Navigating to a different web page, e.g. external documentation
  • Note: Warn the user if links open a new window or downloads a file (PDF, for example).

When to consider alternatives

  • Opening or closing a modal or dialog
  • Triggering a dropdown menu
  • Submitting data to the server

Accessibility

  • Users should be able to tab to navigate between links.
  • Users should be able to activate a link when pressing ‘Enter’ on their keyboard.
  • Users should be able to identify links without relying on color alone.
  • Users should be able to activate hover and focus states with both a mouse and a keyboard.

On this page

  • Examples
    • On light background
    • On dark background
  • Code
    • Styles
  • Guidance
    • When to use
    • When to consider alternatives
    • Accessibility

Have ideas?

  • Contact the team
  • Start a discussion on GitHub
  • Edit this page
Plain WritingPrivacy PolicyU.S. Web Design System

A federal government website managed by the Centers for Medicare & Medicaid Services 7500 Security Boulevard, Baltimore, MD 21124