Sure! Here's an example of a simple snake game implemented as a single HTML file:
To play the game, you can copy and paste the above code into a new HTML file and open it in a web browser. The game will be displayed on a canvas element with the snake (green squares) and the apple (red square). The snake can be controlled using the arrow keys on your keyboard. The objective is to eat the apples and avoid colliding with the snake's body or the walls of the game area.