Just as with a non-web game, the answer to this will depend highly upon the type and complexity of the game you want to build as well as what hardware you want to support. There are many frameworks out there for building web browser games. You can even use the Unity game engine to build HTML games. There are many mobile app games built using web technologies.
Googling javascript game engine will provide several examples such as https://html5gameengine.com/