Skip to main content

An official website of the United States government

Here's 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.

Design System

An official website of the United States government

Here's 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.

CMS Design System
Theme:

Design system switcher

Version:

Design system switcher

    • For developers
    • Child Design Systems
    • Accessibility
    • Design Principles
    • Print guidelines
    • Support Policies
    • CSS normalization
      • Headings
      • Body
      • Content
      • Links
      • Lists
    • Spacing
      • Layout Grid
      • Breakpoints
    • Inverse Base
    • Theme colors
    • System color tokens
    • Components overview
    • Global config
    • Component analytics
    • 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
      • Healthcare.gov Header
      • Medicare.gov Header
    • Hint
    • Icon
    • Idle Timeout
    • Inline Error
    • Inset (HC.gov)
    • Label & Legend
      • Healthcare.gov Logo
      • HHS Logo
      • Medicare.gov Logo
    • Modal Dialog
    • Month Picker
    • Pagination
    • Radio Button
    • Review
    • Skip Nav
    • Spinner
    • Stars (M.gov)
    • Step List
    • Table
    • Tabs
      • Label Masked Field
      • Masked Field
      • Text Field
    • Third Party External Link
    • Tooltip
    • USA Banner
    • Vertical Navigation
    • Patterns overview
      • Forms
      • Form validation
    • Phone numbers
    • ZIP codes
    • Layouts overview
      • One Column Page Layout
    • Documentation Page
    • Utilities overview
    • Background Color
      • Border Radius
      • Border
    • Display
    • Flexbox
    • Float
    • Focus
      • 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
    • Separating labels, hints, and errors in v9
    • Standardizing spacing in v7
    • Standardizing theme colors in v7
    • Sass to CSS
    • Migrating to v4 buttons
    • Migrating to v2
    • Using agnostic typography classes

What's new?

View code on GitHub

Theme:

Design system switcher

Version:

Design system switcher

Links

Links connect users to a different page or further information.

GithubStorybook logoStorybookSketch logoSketch

  • Examples
    • On light background
    • On dark background
  • Code
    • Style customization
  • Guidance
    • When to use
    • When to consider alternatives
    • Accessibility
    • Related components

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 separate semantics from presentation. 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.

On dark background

This is a text link on a dark background.

This is a visited link on a dark background.

Code

Style customization

The following CSS variables can be overridden to customize links:

CSS variables for link
VariableDefault Core Theme Value
--link__colorhex value: #0071bc--color-primary
--link__color--activehex value: #00395e--color-background-inverse
--link__color--hoverhex value: #004f84--color-primary-darker
--link__color--visitedhex value: #4c2c92--color-visited
--link-inverse__colorhex value: #ffffff--color-white
--link-inverse__color--activehex value: #e9ecf1--color-muted-inverse
--link-inverse__color--hoverhex value: #e9ecf1--color-muted-inverse
--link-inverse__color--visitedhex value: #e9ecf1--color-muted-inverse
--link__text-decoration-offsetauto
--link__text-decoration-thickness1px
--link__text-decoration-thickness--hover1px

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.

Related components

  • Third party external link

On this page

  • Examples
    • On light background
    • On dark background
  • Code
    • Style customization
  • Guidance
    • When to use
    • When to consider alternatives
    • Accessibility
    • Related components

Have ideas?

  • Contact the team
  • Start a discussion on GitHub
  • Edit this page
Plain WritingPrivacy PolicyU.S. Web Design System
Department of Health and Human Services

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