# \[rel="preload"\]

> The `preload` value of the `rel` HTML attribute tells the browser to download a resource early because it will be needed soon.

## How do I use rel preload for fonts, images and scripts?

The value of the `rel` attribute of the `<link>` element that fetches a critical resource as early as possible without executing it. Requires the `as` attribute, such as 'font', 'style' or 'image', and is often used for fonts and hero images.

- Topic: Links
- Type: attribute
- Browser support: Chrome 50+, Chrome Android 50+, Edge 79+, Firefox 85+, Firefox Android 85+, Safari 11.1+, Safari iOS 11.3+

## Example

Wrong:

```html
<link rel="preload" href="/fonts/inter.woff2">
<link rel="preload" href="/hero.webp">
```

Right:

```html
<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/hero.webp" as="image">
```

With `as` and `crossorigin` set, the browser can match and reuse the preloaded files.

## Common mistakes

- Leaving out `as`, so the browser downloads the resource twice.
- Preloading a font without `crossorigin`, so the preloaded file is not used.

## Key points

- Every preload has an `as` attribute that matches the resource type.
- Fonts are preloaded with `crossorigin`, even when they are on the same origin.
- Only resources the page uses right away are preloaded.

## Interview questions

### What is the difference between preload and prefetch?

`preload` fetches a resource the current page needs with high priority, while `prefetch` fetches one likely needed for a future navigation at low priority.

### Why does the console warn that a preloaded resource was not used?

The page did not use the file soon after load, or the `as` and `crossorigin` values did not match the real request.

## Related cards

- [\[rel="preconnect"\]](https://wonderium.dev/html/rel-preconnect.md)
- [\[rel="modulepreload"\]](https://wonderium.dev/html/rel-modulepreload.md)
- [\[fetchpriority\]](https://wonderium.dev/html/fetchpriority.md)
- [@font-face](https://wonderium.dev/css/font-face.md)
- [preload()](https://wonderium.dev/react/preload.md)

---

- Level: [HTML](https://wonderium.dev/html.md)
- HTML version: https://wonderium.dev/html/rel-preload
- Last updated: 2026-11-25
