Sure, here's an example of a simple game implemented as a single HTML file, using JavaScript and enclosed in script tags:
This game is a simple player-controlled square on a canvas. Use the arrow keys on your smartphone to move the blue square around. The canvas is 400x400 pixels. The game loop constantly redraws the game on the canvas every 10 milliseconds.