I am trying to make a game similar to cookie clicker. This is part of my code:
var clicks = 0;
function updateClickCount() {
document.getElementById("clickCount").innerHTML = clicks;
}
<center>
<div class="game-object">
<button type="button" onClick="clicks++;updateClickCount();" id="push" style="width:400px;height:60px;">
<font size="5" face="verdana" color="white">Click me for Cola!</font>
</button>
<div id="clickCount"></div>
</div>
</div>
I want to make the variable that appears on the screen after clicking the button a different font. I also want to know how to make it different colors.
center(also, you seem to have forgotten to close that tag). Do not use thefonttag--we use CSS for that these days.