Coded22
December 19, 2025, 3:50pm
1
This code is not working whats wrong with it?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Click the Ball Game</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Click the Ball!</h1>
<p>Score: <span id="score">0</span></p>
<div id="gameArea" display:none>
<div class="ball" onclick="clickBall()"></div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
ILM
December 19, 2025, 4:00pm
2
what are you expecting that code to do?
ILM
December 19, 2025, 4:02pm
3
I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add the backticks.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
1 Like
Coded22
December 19, 2025, 6:53pm
4
It is a little game where you click the ball when it shows up
ILM
December 19, 2025, 6:55pm
5
have you also written some JavaScript code for this?
Coded22
December 19, 2025, 6:56pm
6
The Ball doesn’t show up though
ILM
December 19, 2025, 6:58pm
7
the code you have shared is not enough, have you written also some javascript?
Hi @Coded22 !
Welcome to the forum!
As mentioned earlier, we need more information. Right now you have only shared some HTML.
It might be easier to add all of this on codepen with the HTML, CSS and JS so we can see the full picture and help you better.
1 Like