# Mobile screen resolution and canvas size

I'm making a HTML5 game using the canvas. I was building it for my iPhone 6 which state a resolution of 1334x750 pixels but also a resolution of 667x375 points. I notice that my canvas need to match the size in points or else it would go beyond the screen.

<canvas width="667" height="375" />


Is it possible for my canvas to actually be 1334x750? Or am I stuck at 667x375?

• Have you tried putting "px" after the sizes? Mar 7 '18 at 16:52
• @Bálint I thought I tried it but I'll try again tonight. Mar 7 '18 at 17:05

You are not "stuck" at a lower resolution, since the device will use it's actual resolution.

As far as I understand, at a logical level you will be using points (not pixels). If you were to work on pixels, your game would look bigger on older devices with less pixel density.