HTML <link> rel Values Reference

All HTML link rel values with valid link types, effect and browser support.

Searchable HTML link rel attribute reference covering stylesheet, preload, modulepreload, preconnect, dns-prefetch, canonical, icon, manifest, alternate and more.

What is the difference between preload and prefetch?

rel=preload tells the browser to fetch a resource needed for the current navigation with high priority, requiring an as attribute. rel=prefetch fetches a low-priority resource likely needed for a future navigation. Preload is for now; prefetch is for next.

The rel attribute on <link> declares the relationship between the document and a linked resource — from loading stylesheets and preloading assets to declaring canonical URLs and icons. This searchable reference lists the common rel values, what each does and the attributes they pair with.

How it works

A <link> element in the <head> connects the page to an external resource; rel names the kind of relationship and the browser acts accordingly:

<link rel="stylesheet" href="/main.css" />
<link rel="preload" href="/font.woff2" as="font" type="font/woff2" crossorigin />
<link rel="modulepreload" href="/app.js" />
<link rel="preconnect" href="https://cdn.example.com" />
<link rel="canonical" href="https://example.com/page" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />

Resource-hint relations (preload, preconnect, dns-prefetch, prefetch, modulepreload) shape the loading priority and timing; semantic relations (canonical, alternate, manifest, icon, author) describe the page. The attribute is a space-separated list, so multiple relations can combine.

Tips and notes

  • preload requires an as value or the browser may double-fetch.
  • Cross-origin font preloads need crossorigin to match the actual request.
  • Use alternate with hreflang for localized variants and with type for feeds.
  • Keep one meaningful canonical per page; conflicting canonicals are ignored.