เพื่อจัดตำแหน่ง canvas ให้อยู่กลางใน HTML5 ให้รวมแท็ก canvas ไว้ในแท็ก div จากนั้นจัดตำแหน่ง div ให้อยู่กลาง ด้วยวิธีนี้ canvas ก็จะอยู่กลางเช่นกัน
ตัวอย่าง
<!DOCTYPE html>. <html>
<body>
<div style="text-align:center;">
<canvas style="background-color:GREEN;">This is my canvas</canvas>
</div>
</body>
</html>