JSFiddle - React, Tailwind, and code Playground
HTML
<div class="title" name="Game Title" id="0">Game Title</div>
<div tabindex="0" class="gamecontainer" name="Game Container" id="1">
Press any key to start.
</div>
<div class="gamemonitor" name="Game Monitor" id="2">
Game Monitor:
</div>
JavaScript
function startGame() {
document.getElementById("2").innerHTML = ('Testing!');
}
window.onload = function() {
document.getElementById("1").onkeypress = startGame;
}