Sure! Here's an example of a simple Snake game implemented as a single HTML file using JavaScript:
To play the game, copy and paste the above code into a single HTML file, save it, and open it in a web browser. The game will be rendered on a canvas element, and you can control the snake using the arrow keys on your keyboard. The goal is to control the snake and make it collect the oranges (represented as green squares) while avoiding collisions with the boundaries and itself. If the snake collides, the game ends with a "Game over!" message.
Note: This is a basic example of a Snake game and can be further enhanced with additional features, levels, or visual improvements, based on your requirements.