HTML <a> Tag with 'download' Attribute

<a href="http://www.htmlcodes.ws/images/image-codes/city-skyline.gif" download>Download Image</a>

How to Use the above Code

  1. Replace the value of the href attribute to be the URL of the resource you're linking to for download.
  2. Replace the anchor text (Download Image) with the text you want the user to see (or other content such as an image).

About the download Attribute

The download attribute indicates that the link is to be used for downloading a resource (such as a file). The author can specify a default file name by providing a value. This attribute is optional.

Value:

[Default file name.] (optional)