Sure! Here's a simple example of a game implemented in a single HTML file with JavaScript:
This game creates a simple blue player block that you can move left and right using the arrow keys on your keyboard. The player block cannot move off the edges of the canvas. Feel free to modify and expand upon this code to create a more complex game!