The essentials

Quick reference

One focused task per row. Jump to the related section for complete, working examples.

UseSyntaxExamples
Link within the site<a href="/guides/setup/">Setup guide</a>View examples
Link beside the page<a href="api.html">API reference</a>View examples
Link to another site<a href="https://example.com/status">Service status</a>View examples
Link to a section<a href="#installation">Installation</a>View examples
Link to another section<a href="/docs/cli/#options">CLI options</a>View examples
Start an email<a href="mailto:support@example.com">Email support</a>View examples
Start a phone call<a href="tel:+15550100100">Call support</a>View examples
Suggest a download<a href="/files/report.pdf" download> Download the report </a>View examples
Name a download<a href="/exports/data.csv" download="customers.csv"> Download customer CSV </a>View examples
Open a new tab safely<a href="https://example.com/docs" target="_blank" rel="noopener noreferrer"> External documentation </a>View examples
Create primary navigation<nav aria-label="Primary"> <a href="/docs/">Docs</a> <a href="/support/">Support</a> </nav>View examples
Create breadcrumb navigation<nav aria-label="Breadcrumb"> <ol> <li> <a href="/">Home</a> </li> <li>Docs</li> </ol> </nav>View examples
Mark the current page<a href="/docs/" aria-current="page">Docs</a>View examples
Add a skip link<a class="skip-link" href="#main-content"> Skip to content </a>View examples
Hint the target language<a href="/pt/ajuda/" hreflang="pt-BR"> Ajuda em português </a>View examples
Hint the resource type<a href="/files/guide.pdf" type="application/pdf"> PDF guide </a>View examples

A link should take the user to a resource or location and explain that destination in its accessible text. Use buttons for in-page actions, group major destinations in named navigation landmarks, expose the current page, and preserve predictable browser behavior unless opening a new context is genuinely useful.

Step by step

Detailed examples

04

Handle downloads and new browsing contexts carefully

download is a suggestion and is most reliable for same-origin resources. target blank should be disclosed when the context change may surprise users; modern browsers imply opener isolation in many cases, but explicit noopener documents the intent. Add noreferrer only when suppressing the Referer header is also desired.

Download links and external documentation
<a href="/files/report.pdf" download>Download the report</a>
<a href="/exports/data.csv" download="customers.csv">Download customer CSV</a>
<a href="https://example.com/docs" target="_blank" rel="noopener noreferrer">External documentation (opens in a new tab)</a>
Back to quick reference ↑
05

Name distinct navigation landmarks

nav identifies a major set of navigation links, not every group of links. When a page has several nav elements, give each a concise accessible name. Breadcrumbs are commonly represented as an ordered list because their sequence conveys hierarchy.

Primary and breadcrumb navigation
<nav aria-label="Primary">
  <a href="/docs/">Docs</a>
  <a href="/support/">Support</a>
</nav>
<nav aria-label="Breadcrumb">
  <ol><li><a href="/">Home</a></li><li>Docs</li></ol>
</nav>
Back to quick reference ↑
06

Expose current state and bypass repeated content

aria-current page marks exactly one current page in a navigation set. A skip link should be the first useful focus target and point to the main content container; it may be visually hidden until focused but must never be removed from keyboard navigation.

Current page and skip target
<a class="skip-link" href="#main-content">Skip to content</a>
<nav aria-label="Primary">
  <a href="/">Home</a>
  <a href="/docs/" aria-current="page">Docs</a>
</nav>
<main id="main-content" tabindex="-1"><h1>Documentation</h1></main>
Back to quick reference ↑

Local code tester

Try navigation markup

Edit the named navigation, current-page link, skip target, and destinations, then render them locally.

Runs in your browser
Preview

Sources and further reading

References

Authoritative documentation used to verify and expand this cheat sheet.

  1. WHATWGHTML Standard — Linkshtml.spec.whatwg.org
  2. MDN Web DocsThe a elementdeveloper.mozilla.org
  3. MDN Web DocsThe nav elementdeveloper.mozilla.org
  4. MDN Web DocsARIA: aria-current attributedeveloper.mozilla.org

Help us improve

Found a typo or missing example?

Tell us what would make this cheat sheet clearer, more complete, or more useful.

Share feedback