HTML Attributes
HTML download attribute
Requests download rather than navigation for an eligible link. Browsers may restrict cross-origin downloads and can adjust the suggested filename. Applicable elements include: <a>, <area>. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it. The browser can ignore the suggested filename or alter it to satisfy filesystem rules. Cross-origin links generally do not honor the download attribute in the same way as same-origin, blob or data URLs; server Content-Disposition and browser policy can influence the result.
Formal Syntax & Structure
html syntaxhtml
download="report.pdf"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| download | optional suggested filename | Requests download rather than navigation for an eligible link. Browsers may restrict cross-origin downloads and can adjust the suggested filename. |
Working Example
Example Snippethtml
<a href="report.pdf" download="report.pdf">Download report</a>Browser Compatibility
Minimum supported versions across modern rendering engines
Blink (modern)
Chrome
14
Yes
EdgeHTML / Blink
Edge
18
Yes
Gecko
Firefox
20
Yes
WebKit
Safari
10.1
Yes
Anchor download support; Edge 13–17 was partial. Cross-origin downloads and suggested filenames are restricted.
HTML Living Standard