The rel attribute names the relationship between the current document and a linked URL. It is valid on <link>, <a>, <area>, and <form>. The value is an unordered set of unique space-separated keywords (link types).
Unlike class, tokens must be meaningful. Common cases: load a stylesheet (rel="stylesheet"), set a favicon (rel="icon"), or harden target="_blank" links (rel="noopener noreferrer").
Baseline · Widely available.
Not deprecated as an attribute. Allowed keywords depend on the element — check the value table below.
Do not write rel="shortcut icon".
shortcut is non-conforming and ignored. Use rel="icon" only. apple-touch-icon is a separate non-standard iOS keyword.
Syntax
HTML Syntax
syntax.html
<link rel="stylesheet | icon | canonical | …">
<a rel="noopener noreferrer | nofollow | …">
In JavaScript: element.rel (string) or element.relList (token list API).
Values
Attribute Values
Most useful everyday keywords (not the full registry):
One line:rel tells browsers and tools how a URL relates to this page — stylesheet, icon, security hints, and more.
Frequently Asked Questions
It names the relationship between the current document and a linked resource as space-separated link-type keywords. Valid values depend on whether you use it on link, a, area, or form.
Yes. Separate unique keywords with spaces, for example rel="noopener noreferrer". Order does not matter.
Use rel="noopener" (and usually noreferrer). Modern browsers often imply noopener for _blank, but stating it is still good practice.
No. shortcut is non-conforming and ignored. Use rel="icon" only.
On <link>, not on <a>. Anchors use annotation types like nofollow, noopener, and noreferrer.
No. It is a core HTML attribute. Some individual keywords (for example prerender) are obsolete or superseded; most common values remain current.