Я взял код и обновил его на codepen. Вы можете проверить это по ссылке ниже. Надеюсь, это сработает ...
<body>
<h1>Football Quiz Game</h1>
<p>Once you are ready to begin, please click the button below. Goodluck</p>
<button type="button" name="mainButton" id="mainButton">Begin Quiz!</button>
<div class="firstQuestion">
<h3>Who is the top all-time goalscorer in the UEFA Champions League?</h3>
<form class="question1">
<input type="radio" id="Cristiano Ronaldo" name="topUCLscorer"
value="Cristiano Ronaldo">
<label for="topUCLscorer">Cristiano Ronaldo</label>
<input type="radio" id="Raul" name="topUCLscorer" value="Raul">
<label for="topUCLscorer">Raul</label>
<input type="radio" id="Lionel Messi" name="topUCLscorer"
value="Lionel Messi">
<label for="topUCLscorer">Lionel Messi</label>
<input type="radio" id="Karim Benzema" name="topUCLscorer"
value="Karim Benzema">
<label for="topUCLscorer">Karim Benzema</label>
</form>
</div>
</body>
CSS
.firstQuestion {
display: none;
}
JavaScript
const firstQuestion = document.querySelector('.firstQuestion');
const begin = document.querySelector('#mainButton');
begin.addEventListener('click', (e) => {
e.preventDefault();
begin.style.display = 'none';
firstQuestion.style.display = 'block';
});
Попробуйте это: https://codepen.io/dinakajoy/pen/eYJdqYx