I am currently designing a web page that includes
<div class="cane-wrap">
<h1 class="mc">christmas tic tac toe</h1>
</div>
https://i.sstatic.net/R3Yps.png
located at the top center of the webpage, with autoplay running in the background using JS.
I successfully removed the play button by adding style="display:none;"
, but now I realize that I can't stop the music. How can I make the <div><h1>
clickable as a button in order to toggle the music on and off?
After some research, I found ways to turn div elements into buttons, but is it possible for an <h1>
element to function as a button too?