Skip to main content
Opening the game in a new tab or window is the preferred integration. It gives the best compatibility and the best player experience across every device. Iframe support is inconsistent between browsers and operating systems — especially on mobile — and when you embed, the sizing problems become yours.
If you still need to embed, meet the requirements below exactly.

Required attribute

allow="fullscreen" lets the game enter full-screen mode, which several games rely on for a usable layout on small viewports. Omit it and players get a cramped experience with no way out of it.

Sizing

Iframe use on mobile devices is discouraged. If you have any option to open a new tab here, take it.
The units are deliberate. lvh/lvw (largest viewport) on mobile reserve space for the browser chrome at its smallest, so the game does not get clipped when the address bar retracts. svh/svw (smallest viewport) on desktop size against the stable viewport. Substituting vh reintroduces the mobile clipping these units exist to avoid.

A working embed

What you take on

The on-screen keyboard resizes the viewport, and browser chrome appears and retracts as the player scrolls. Both can shrink the game below a playable size unless the container is sized in lvh/lvw as specified.
Without allow="fullscreen" the game cannot escape your container. Some games are unusable in portrait on a small viewport, and full screen is their way out.
Safari’s ITP and equivalent protections restrict storage in third-party frames. Sessions that survive a reload in a top-level tab can silently fail to resume inside an iframe.
An iframe inside a scrollable wrapper produces two competing scroll surfaces. Touch gestures meant for the game get eaten by your page.
A middle path that keeps your branding: open the game in a full-screen overlay within your own page — your header stays, the game gets the whole viewport, and you avoid nested scrolling.