This will be a simple and useful tutorial on how to add download buttons.
In your HTML file make an anchor tag:
Then, add the content you want to download in the href attribute:
Lastly, to add a name to the file that the user is going to download, add the name in the download attribute:
<a href="test.png" download="Test-file">Download</a>
Now, if you click on our download button, it should download the file.