link element
The HTML element, usually in the head, that connects the page to another resource such as a stylesheet, a web app manifest or a resource hint.
In more detail
Its rel attribute says what the link is for: rel="stylesheet" loads CSS, rel="preload" fetches something early, rel="manifest" points to a web app manifest. Stylesheet links support the integrity attribute for Subresource Integrity.
Related terms
- stylesheet — A file or block of CSS rules that tells the browser how a page's elements should look.
- preload — A resource hint, <link rel="preload">, that makes the browser download a file needed for the current page right away at high priority.
- resource hint — A link element that tells the browser in advance about something it will need, such as preload, prefetch or preconnect, so it can start early.
- web app manifest — A JSON file linked from the page that describes the installed app: its name, icons, theme colours, start URL and display mode.
Taught in
- Critical Rendering Path: Preload, Prefetch And Scripts — Frontend Architecture & Web Platform
- CSRF Mitigations, SameSite Cookies And Subresource Integrity — Frontend Architecture & Web Platform