Sure! Here's an example of a tic-tac-toe game implemented as a single HTML file using JavaScript:
This code sets up a canvas element where the tic-tac-toe board is drawn. Players can make moves by clicking on the cells of the board. The game checks for a winning condition or a draw and alerts the players accordingly.
Note that this is a basic implementation and can be further enhanced with additional features and styling.