Creating a download link in HTML is straightforward; add an anchor tag and point to the file within the href attribute. Some file types, however, (such as images, .pdf, .txt, and .doc for example) won’t be downloaded. They, instead, will be opened in the browser. If you have server-side access to your website there are some workarounds you can use, such as configuring the .htaccess , to download these files directly