<link>
The link element defines a relationship between the document and an external resource, most often a stylesheet.
Syntax
<link rel="stylesheet" href="url"> Examples
<link rel="stylesheet" href="/styles.css">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="preload" href="/font.woff2" as="font" crossorigin>
Output
Loads a stylesheet, sets the favicon, and preloads a web font; nothing is rendered visually by the tags themselves.
Notes
A void element placed in <head>. Common rel values: stylesheet, icon, preload, preconnect, canonical, alternate. Use preload/preconnect to improve loading performance.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |