HTML Attributes
HTML as attribute
Identifies what kind of resource a link preload will fetch, such as script, style, image or font. It must match the later request so the browser can reuse it. Applicable elements include: <link>. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.
Formal Syntax & Structure
html syntaxhtml
as="image"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| as | enumerated resource destination | Identifies what kind of resource a link preload will fetch, such as script, style, image or font. It must match the later request so the browser can reuse it. |
Working Example
Example Snippethtml
<link rel="preload" href="hero.webp" as="image">Browser Compatibility
Minimum supported versions across modern rendering engines
Chrome
50
Yes
Edge
17
Yes
Firefox
56
Yes
Safari
10
Yes
Checked desktop BCD snapshot: as on link; not a claim about all preload behavior. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
HTML Living Standard