The download attribute on an <area> tag changes the URL from a redirect to a download link.
If download
has a value, it will be used as the downloaded file name.
A download attribute on 3 <area> tags.
Click any area and an area-specific image will download.
<img src="/img/html/computer-map.png" alt="Computer" usemap="#computermap">
<map name="computermap">
<area download shape="rect" coords="253,142,16,2" href="/img/html/area-monitor.png">
<area download shape="rect" coords="262,218,0,156" href="/img/html/area-keyboard.png">
<area download shape="circle" coords="267,234,22" href="/img/html/area-mouse.png">
</map>
The download attribute specifies that the area URL should be downloaded when clicked.
If download assigns a string value, it will be used as the downloaded file name.
If not set, the URL name will be used.
Not all browsers support the download
attribute.
<area href="URL" download="filename" />
Value | Description |
---|---|
filename | Optional string value that specifies the download filename. |
Note: An href value is required for download to work.
Here is when download support started for each browser:
Chrome
|
14.0 | Jan 2010 |
Firefox
|
20.0 | Apr 2013 |
IE/Edge
|
Not Supported | |
Opera
|
15.0 | May 2013 |
Safari
|
Not Supported |