Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <area> download Attribute

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.

Example

#

A download attribute on 3 <area> tags.
Click any area and an area-specific image will download.

Computer
<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>

Using download

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.


Syntax

<area href="URL" download="filename" />

Values

#

Value Description
filename Optional string value that specifies the download filename.

Note: An href value is required for download to work.


Browser support

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

You may also like

 Back to <area>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides