Here's an example of a Snake game implemented as a single HTML file with JavaScript, enclosed in script tags:
This implementation uses the HTML5 canvas element to draw the game and handles keyboard controls for the snake movement. The game starts automatically when the page is loaded and ends when the snake collides with itself or goes out of bounds. The score is displayed on the canvas, and the game over message is shown when the game ends. The snake's movement speed can be adjusted by changing the interval duration in the game loop.