Dhairya Shah
Dhairya Shah's Blog

Follow

Dhairya Shah's Blog

Follow
How to create a download link in HTML?

How to create a download link in HTML?

Dhairya Shah's photo
Dhairya Shah
·Aug 24, 2022·

1 min read

Play this article

To let users download files like (PDFs or PPTs, etc.) from your website using HTML,

<a href="file.pdf" download>Download</a>

This will force the file to be downloaded into the device (even if files like PDFs can be loaded in the browser).

Note: This will only work on links of same origin

Thanks for reading

Follow me on Twitter

Thanks for reading!

 
Share this