I want to finish this project I was working on for my mom for Valentine's day.
I want to be able to click an h2 and have it trigger multiple events, for example making the background color green, changing the font size of h2 to something bigger like 50px and changing the font size of h1 to 50px
I've never triggered multiple events at the same time from an onclick event. I'd love assistance to make mom happy.
body {
background-color: lightblue;
}
<html>
<body>
<h1 style="color:purple;
text-align:center;" onclick="this.style.color='yellow'; this.style.fontSize='40px'; document.body.style.backgroundColor='green';">
Happy Valentines Day Mom!
</h1>
<img src="Source/me.jpg" alt="This is Me" width="300" height="300" align="middle">
<p align="center" style="color:white;" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='';">
Lots of love and wishes on this day. It is not possible to repay the love that you have given to me. I just can love you, dear mom. Take my lots of love on this Happy Valentine's Day.
</p>
<img src="source/mom.jpg" alt="Mom" width="200" height="200" align="middle">
<h1 style="color:blue;
text-align:center;" onclick="this.innerHTML='Best Mother Ever!';">
I love you so much! - J
</h1>
<br>
<h2 id="joke" align="center" style="color:white;" onmouseover="this.style.textDecoration='line-through';" onmouseout="this.style.textDecoration='';">P.S. I love you more!</h2>
<button type="button" onclick='document.getElementById("joke").innerHTML = "P.S.S. you are the best!"'>Click Me!</button>
</body>
</html>