v1.3.1
  1. Foundations
  2. How-tos
  3. Patterns
    1. Autocomplete
    2. Button
    3. Callout
    4. Chat
    5. Description List
    6. Fallback Image
    7. Feedback
    8. Focus Indicator
    9. Footer
    10. Header
    11. Hero
    12. IIIF Image
    13. Link
    14. Page Title
    15. Results per Page

Link

Style links so users can easily identify and interact with them.

Help users navigate from one page or website to another.

When to use

Use links for navigation from one page or website to another.

How to use

Links within body text

Links within body text use --pl-color-fg-accent and are underlined by default so users can identify them without relying on color alone.

a {
  color: var(--pl-color-fg-accent);
  text-decoration: underline;
  text-underline-offset: var(--pl-link-text-underline-offset);
  text-decoration-thickness: var(--pl-link-text-decoration-thickness);
}

a:hover {
  text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);
}
<p class="pl-reset pl-typeset pl-margin-l">Lorem ipsum dolor sit amet, <a href="#">consectetur adipiscing elit</a>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut <a href="#">aliquip ex ea commodo</a> consequat.</p>

Links presented together

When many links are presented together, the underline is optional. Removing it is common in navigation and list items where repeated underlines impede readability. Links should still underline on hover.

<style>
  nav a {
    text-decoration: none;
    color: var(--pl-fg-default);
  }

  nav a:hover {
    text-decoration: underline;
    text-underline-offset: var(--pl-link-text-underline-offset);
    text-decoration-thickness: var(--pl-link-hover-text-decoration-thickness);
  }
</style>

<nav class="pl-reset pl-typeset pl-margin-s pl-flex">
  <a href="#" class="pl-padding-s">Lorem</a>
  <a href="#" class="pl-padding-s">Ipsum</a>
  <a href="#" class="pl-padding-s">Dolor</a>
  <a href="#" class="pl-padding-s">Amet</a>
</nav>

Prefer opening links in the same tab

New tabs disorient users, especially on mobile, and break the back button. Consider a new tab only when navigating away would lose the user's work, like linking to help from a form. When you do, warn the user.

Related guidelines

Design System

About Writing for People Build Digital Spaces v1.3.1