HTML <area> downloadAttributes

HTML area 标签参考手册HTML <area> Tag

Example

An image with a clickable download area:

<img src="planets.gif.html" width="145" height="126" alt="Planets" usemap="#planetmap">

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="information_about_the_sun.htm.html" download="sun">
<area shape="circle" coords="90,58,3" alt="Mercury" href="merglobe.gif.html" download="mercury">
<area shape="circle" coords="124,58,8" alt="Venus" href="information_about_the_planet_venus.txt.html" download="venus">
</map>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently, only Firefox and Chrome support the download attribute.


Definition and Usage

The download attribute specifies the download link address.

You only need to specify the download attribute when the href attribute is used.

This attribute can also specify the name of the downloaded file. There is no restricted value for the filename; the browser will automatically add the extension of the downloaded file (.img, .pdf, .txt, .html, etc.) to the end of the filename.


Differences Between HTML 4.01 and HTML5

The download attribute is new for the <area> tag in HTML5.


Syntax

<area download="filename">

Attribute Values

Value Description
filename Specifies the file name.


HTML area 标签参考手册HTML <area> Tag

Other Extensions