description & Usage
To specify the relationship between the current html document and an external resource used in it, we use the <link> tag.
The <link> tag is mostly used for linking to external pages or adding favicons to the reference website.
The <link> tag itself cannot be used alone unless you use the corresponding attribute in your codes.
Browser compatibility and Support
# | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
<link> |
Attributes
Attributes | Values | Description |
---|---|---|
href |
URL
|
en |
hreflang |
language code
|
en |
media |
media query
|
en |
rel |
all value
|
en |
title |
text
|
en |
type |
media type
|
en |
Global Attributes
The link tag supports the HTML Global Attributes.
Event Attributes
The link tag supports the HTML Event Attributes.
Default CSS
Most browsers will display the link tag with the following default style: