I have an audio file on my website. It’s played once you click a button and it works and thats all well and good.
However, I need it so that when you click the 3 dots at the end, users can download said audio. audio screenshot. Any ideas on how to achieve this without javascript?
I’ve looked up a couple solutions via web3schools and sololearn. I don’t have the firmest grasp on HTML and CSS so I just tried copying what they had, but none of it seemed to work.
2
Answers
You can do this without javascript by using the download attribute for the
<a>
tag.Optionally, you can suggest a file name for the downloaded file by adding…
https://www.w3schools.com/tags/att_a_download.asp
You can use the
download
attribute in a hyperlink. Here’s an example:You can also make it more visually appealing by using a
button
inside the hyperlink. Here’s another example:If you don’t need the class or if it’s declared under a different name, feel free to change it! 🙂