window.onload = function() { var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d") context.strokeStyle = "orange"; context.strokeRect(10,10,150,50); context.fillStyle = "rgba(218,0,0,0.4)"; contextfillRect(150,30,75,75); }
Simple Canvas Examples