Sure, here's a simple tower defense game implemented as a single HTML file using JavaScript:
In this simple tower defense game, enemies start from the top row and move down the grid towards the player's base, represented by the blue square. The player can place towers represented by green squares to defend their base. The goal is to prevent the enemies from reaching the base.
Note: This is a basic implementation for demonstration purposes, and it can be expanded upon to add additional features such as different enemy types, tower upgrades, and more.