<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <canvas id="my_canvas"></canvas> </body> <script> var canvas = null; var context = null; setup = function(){ canvas = document.getElementById("my_canvas"); context = canvas.getContext('2d'); canvas.width = 1200; canvas.height = 720; }; </script> </html>