rel

The rel attribute defines the relationship between the current document and a linked resource.

Since HTML 2.0 Spec ↗

Syntax

rel="relationship"

Examples

<a href="https://x.com" target="_blank" rel="noopener noreferrer">External</a>
<link rel="stylesheet" href="/app.css">
<link rel="canonical" href="https://site.com/page">
Output
Marks the link as security-safe, loads a stylesheet, and declares the canonical URL.

Notes

Common values: noopener, noreferrer, nofollow, stylesheet, icon, preload, preconnect, canonical, alternate. Multiple values are space-separated.

Browser & runtime support

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12

See also