Also, you should keep in mind that for web you likely do not want to render at native screen resolution. Some people may have 1440p or 4k monitors or phones, but not the latest graphics card / chip, and it will be very slow, even for a 2D game.
If you are doing more of an intensive 3D game, you probably want to default to 720p, and then maybe have an options menu that allows 480p, 720p, and 1080p choices.