How TO - Download Link

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP




<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->



How TO - Download Link



❮ Previous
Next ❯


Learn how to create a download link with HTML.



Downlad Link


You can use the HTML download attribute to specify that the target will be downloaded when a user clicks on the hyperlink.



Example



<a href="/images/myw3schoolsimage.jpg" download>
  <img src="/images/myw3schoolsimage.jpg"
alt="W3Schools">
</a>

Try it Yourself »

This attribute is only used if the href attribute is set.


The value of the attribute will be the name of the downloaded file. There are
no restrictions on allowed values, and the browser will automatically detect the
correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.).


You can also specify a value for the download attribute, which will be the new filename of the downloaded file. If the value is omitted, the original filename is used.



Example


Specify a value for the download attribute, which will be the new filename of the
downloaded file ("w3logo.jpg" instead of "myw3schoolsimage.jpg"):



<a href="/images/myw3schoolsimage.jpg" download="w3logo">
  <img src="/images/myw3schoolsimage.jpg"
alt="W3Schools">
</a>

Try it Yourself »



Browser Support


The numbers in the table specify the first browser version that fully supports the attribute.














Attribute
download 14.0 13.0 20.0 10.1 15.0


❮ Previous
Next ❯

Popular posts from this blog

California

New York City

CNN