Sure, here's an example of a game implemented as a single HTML file, using JavaScript:
This is a simple game where you control a blue player and try to collect red creatures by tapping or clicking on the screen. When you spawn a creature, it moves horizontally and changes direction when reaching the edge of the canvas. If you spawn multiple creatures, there's a chance that a random creature will be killed on collision with another creature. The score increases by a large amount when this happens.