In HTML5 <a> tag has a new "download" attribute.
Eg:
The 'download' attribute will work with .pdf, .txt, .html, etc. file extensions.
Final code and demo is here
Demo
Eg:
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3_cJrsWP23faPEmIDCKvVH97xSZGJqUwdIWPQhad_fqgsZNbFjpCxZn9Uy4fjfV9MxCTNMLfw9s9MpUOczG8KNkR5_2pXO-vU2PwJ2EtuG_zhHiqvIyAgxiWgkyM_TqvzaCNLzqx4OCN_/s1600/HeaderLogo.png" download>In the above example the image will be downloaded when a user clicks on the hyperlink.
The 'download' attribute will work with .pdf, .txt, .html, etc. file extensions.
Final code and demo is here
Demo
No comments:
Post a Comment