Home > OS >  How to download any pdf using anchor tag in html
How to download any pdf using anchor tag in html

Time:12-25

download pdf

In the colon of href, we should paste URL of the pdf we want to download or something else

Download pdf

In this colon of href i pasted URL of pdf which was in desktop of my laptop

When i went to the website then it is not doing anything when i clicked on download pdf

CodePudding user response:

 <a href="" download="mypdf.pdf">Download PDF</a>

CodePudding user response:

<a href="./directory/yourfile.pdf" download>Download the pdf</a> 

Hope this answer helps

  •  Tags:  
  • html
  • Related