There are a lot of game engines that export to HTML5. Or are you looking to code in JavaScript? I know phaser is pretty popular.
Viewing post in Good HTML5 game engines?
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