var h1= document.getElementByClassName("Tyson") h1.addEventListener("click", function(){ alert("tyson"); h1.style.backgroundColor= "rgb(32, 24, 45); }