Sure! Here's an example of a simple Snake game implemented as a single HTML file using JavaScript and enclosed in script tags:
This code sets up a basic Snake game on a canvas element. You can control the snake using the arrow keys, and the goal is to eat the red food while avoiding collisions with the snake's body and the boundaries of the grid.