over 9 years ago
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to make a download link ?
So we will use HTML anchor download attribute for making a download link.Because The download attribute is used to specifies that the target will be downloaded when a user clicks on the hyperlink.
The download attribute is always used with the href attribute.
syntax of download Attribute
you can take reference of bellow example:
- <!DOCTYPE html>
- <html>
- <body>
- <!-- here create a href attribute and also call download attribute -->
- <a href="http://localhost/test/images.jpg" download>
- <img src="/images.jpg" alt="image_download" width="100" height="100">
- </a>
- </body>
- </html>
<!DOCTYPE html> <html> <body> <!-- here create a href attribute and also call download attribute --> <a href="http://localhost/test/images.jpg" download> <img src="/images.jpg" alt="image_download" width="100" height="100"> </a> </body> </html>
0 Comment(s)