/    Sign up×
Reference /Pin to ProfileBookmark

The link tag, or External Resource Link element, provides the relationship between the current document and an external resource, such as CSS style sheets, favicon, JavaScript file, etc.


The <link> tag only contains attributes and does not wrap around anything.

  <link rel="stylesheet" href="/assets/css/style.css">


Determines how the <link> tag handles cross-origin requests. Possible values: anonymous or use-credentials.

Provides the URL from where the external resource is fetched.

Identifies the language that the linked resource is in.

Identifies the media or device on which the linked resource will be displayed.

Determines which referrer information is sent when fetching the external resource. Possible values: no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, and unsafe-url.

Depending on the specified value, specifies the relationship between the linked resource and the current URL. This attribute is required. Possible values: alternate, author, dns-prefetch, help, icon, license, next, pingback, preconnect, prefetch, preload, prerender, prev, search, and stylesheet.

When using rel="icon", this attribute provides the size of the external resource, in heightxwidth format.

Designates an alternate or preferred stylesheet.

Identifies the media type of the external resource.

Browser Compatibilty


Have a code example of <link>? Submit a codepen.io demo and we'll showcase it here

to submit a demo.


Help @reference spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 9.30,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ

legal: ({
terms: of use,
privacy: policy
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
recent_tips: (
tipper: @ddiebold17,
tipped: article
amount: 1000 SATS,

tipper: @Mqlinka19,
tipped: live stream
amount: 4900 SATS,

tipper: @Mqlinka19,
tipped: article
amount: 10 SATS,