Sure! Here's an example of a simple text-based game, "Adventures of Amelia the Great," implemented as a single HTML file with JavaScript enclosed in script tags:
When you open this HTML file in a web browser, it will ask for your name and then present you with different choices at various location2s throughout the game. Simply click on the provided options to progress through the adventure. Enjoy!