var x = document.getElementById("myCanvas"); var y = x.getContext("2d"); y.fillRect(0, 0, 50, 25);