rel takes a space-separated set of link types. The HTML standard sorts them into kinds:
- External resources that the browser fetches and uses:
stylesheet,icon,manifest, and the resource hints (preload,preconnect, covered under performance). - Hyperlinks that describe another document without fetching it:
canonical,alternate,next,license. - Annotations on a link that
a,areaorformcreates:nofollow,noopener,noreferrer,opener.
The ones interviewers ask about:
canonical(<link>only): the preferred URL for this content, so search engines can merge duplicates such as?utm_source=variants (RFC 6596). The standard gives browsers nothing to do with it.alternate: withtype="application/atom+xml"orrss+xml, a feed for autodiscovery; withhreflang, a translation; withstylesheet, an alternative stylesheet.icon: the favicon. With several, the browser picks bytype,mediaandsizes; with none, it may request/favicon.ico.nofollow: the author doesn't endorse the link, or it exists because of a commercial relationship. It changes nothing in the browser; search engines read it.noopener: a new top-level tab opened by the link gets nowindow.opener, so it can't navigate or script the page that opened it.noreferrer: noRefererheader and an emptydocument.referrer, and it also impliesnoopener.opener: the opt-out. It restoreswindow.opener.
The standard's "get an element's noopener" step returns true when rel contains noopener or noreferrer, or when target is _blank and rel lacks opener. So target="_blank" is already safe from reverse tabnabbing (the opened page redirecting its opener to a phishing page); adding rel="noopener" is harmless and covers browsers older than Chrome 88, Firefox 79 and Safari 12.1, which made _blank imply it.