You might have some luck with a fantasy console like PICO-8 or TIC-80. Both have self contained developement projects that are really easy to get started with, and they can export to HTML. The only disadvantage is that they're intentionally limited so they might not be appropriate for what you're trying to make. We have a guide about fantasy consoles here: https://itch.io/blog/5733/your-field-guide-to-fantasy-consoles