Sure, here's an example of a simple game implemented as a single HTML file using JavaScript and enclosed in script tags. It's a train game where you need to add and remove train cars using pictograms. You can play the game by tapping/clicking the train cars.
To play the game, simply open the HTML file in a web browser and interact with the train cars by tapping/clicking on them. You can try adding and removing train cars. Note that the game loop in the example is empty, so you can implement your own game logic there to make it a fully functional game.