HTML area download property
Examples
A download area with clickable pictures:
<img src="planets.gif" 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" download="sun">
<area shape="circle" coords="90,58,3" alt="Mercury" href="merglobe.gif" download="mercury">
<area shape="circle" coords="124,58,8" alt="Venus" href="information_about_the_planet_venus.txt" download="venus">
</map>
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="information_about_the_sun.htm" download="sun">
<area shape="circle" coords="90,58,3" alt="Mercury" href="merglobe.gif" download="mercury">
<area shape="circle" coords="124,58,8" alt="Venus" href="information_about_the_planet_venus.txt" download="venus">
</map>
try it"
Browser Support
At present, only Firefox and Chrome supports download properties.
Definition and Usage
download attribute specifies the download link.
Only use the href attribute to specify the download properties.
The same property attribute specifies the name of the downloaded file. File names do not limit, the browser will automatically add the suffix at the end of the file name of the downloaded file (.img, .pdf, .txt, .html, etc.).
Differences between HTML 4.01 and HTML5
The download attribute is new for the <area> tag in HTML5.
grammar
<area
download="filename">
Property Value
值 | 描述 |
---|---|
filename | 指定文件名称。 |