0

i'm trying to make an toggle button for audio, where if you click on the button the audio turns off and click again it turns back on.

I have tried searching it up but have only found ways using javascript or jquery and i would prefer not using these.

<audio> <source src="../music/TheMUSIC.mp3" type="audio/mpeg"/></audio>

This is the code i have for my music so far.

maji
  • 1

1 Answers1

0

You could use

<audio controls> <source src="../music/TheMUSIC.mp3" type="audio/mpeg"/></audio>

and add some custom css to it.

Aditya Jangid
  • 104
  • 1
  • 1
  • 12