Specify a value for the download attribute, which will be the new filename of the downloaded file (sun.htm instead of information_about_the_sun.htm and so on):
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The area download attribute</h1>
<p>Click on the sun or on one of the planets to download its content.</p>
<img src="https://horje.com/avatar.png" width="145" height="126" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="https://horje.com" download="sun">
<area shape="circle" coords="90,58,3" alt="Mercury" href="https://horje.com/avatar.png" download="mercury">
<area shape="circle" coords="124,58,8" alt="Venus" href="https://horje.com/avatar.png" download="venus">
</map>
<p>Notice that the filename of the downloaded file will be saved as "sun.htm" instead of "information_about_the_sun.htm" for the sun area, "mercury.gif" instead of "merglobe.gif" for the mercury area and "venus.txt" instead of "information_about_the_planet_venus.txt" for the venus area.</p>
<p><b>Note:</b> The download attribute is not supported in IE, Safari or Opera version 12 (and earlier).</p>
</body>
</html>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |