How to set viewport meta tags and CSS for mobile browser games?
Use a viewport meta tag setting width=device-width, initial-scale=1, maximum-scale=1 and user-scalable=no plus CSS that locks the canvas to 100% of the viewport, disables touch gestures with touch-action: none, and removes default margins and overscroll.