HTML download Attribute

❮ HTML Attributes

Example

<a href="img-boy.jpg" download>

Meaning

The download the link instead of navigating it.

Tips and Notes:




Standard Syntax

<element download="fileName">



Browser Support




Status




Applies to:

The download attribute can be used on the following element:

Element Attribute
<a> download
<area> download






Attribute Values

Value Description
download (optional)fileName Can be used with or without a value



More Examples

Example

<img src="img/desk.jpg" usemap="#image-map">

<map name="image-map">
    <area target="_blank" download="Computer" alt="Computer" title="Computer" href="img/computer.png" coords="365,99,905,783" shape="rect">
    <area target="_blank" download="Cup" alt="Cup" title="Cup" href="img/cup.png" coords="1047,672,97" shape="circle">
    <area target="_blank" download="Mobile" alt="Mobile" title="Mobile" href="img/mobile.png" coords="960,385,1040,541" shape="rect">
    <area target="_blank" download="Book" alt="Book" title="Book" href="img/book.png" coords="175,426,96,527,20,664,232,755,298,628,364,505" shape="poly">
</map>
❮ HTML Attributes