Inquirer Posted June 10, 2020 Share Posted June 10, 2020 How do I make a download link? I am unaware of how to get a file link as in the w3 example. How would you do it? Please give code with an explanation. I will understand so don't worry if it doesn't seem specific. Just try to give an example of as much as you can. Link to comment Share on other sites More sharing options...
Makwana Prahlad Posted June 17, 2020 Share Posted June 17, 2020 (edited) You can use the HTML download attribute to specify that the target will be downloaded when a user clicks on the hyperlink. <a href="/images/myw3schoolsimage.jpg" download> <img src="/images/myw3schoolsimage.jpg" alt="W3Schools"> </a> https://www.w3schools.com/howto/howto_html_download_link.asp Edited June 17, 2020 by Makwana Prahlad Explain Code Link to comment Share on other sites More sharing options...
Inquirer Posted June 18, 2020 Author Share Posted June 18, 2020 Right, I saw the w3 tutorial, but say I want to make a button to download a word doc. How do I get the file link? The w3 file logo was myw3schoolsimage.jpg But what do i put instead of /images/ Link to comment Share on other sites More sharing options...
Ingolme Posted June 18, 2020 Share Posted June 18, 2020 You have to upload the file to your web server. Then the path will be determined by where on the web server you placed the file. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now