<canvas width="600" height="400"> </canvas>
<script>
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "lightgray";
pincel.fillRect(0,0,600,400);
pincel.fillStyle = "green";//propiedad o color
pincel.fillRect(0,0,200,400);//funcion
pincel.fillStyle = "red";
pincel.fillRect(400,0,200,400);
pincel.fillStyle = "yellow";
pincel.beginPath();
pincel.moveTo(300,200);
pincel.lineTo(200,400);
pincel.lineTo(400,400);
pincel.fill();
pincel.fillStyle = "blue";
pincel.beginPath();
pincel.arc(300,200,50,0,2*3.14)
pincel.fill();
</script>
<canvas width="600" height="400"> </canvas>
<script>
var Creeper = document.querySelector("canvas");
var pincel = Creeper.getContext("2d");
pincel.fillStyle = "lightblue";
pincel.fillRect(0,0,600,400);
pincel.fillStyle = "green";
pincel.fillRect(125,50,350,300);
//cabeza
pincel.fillStyle = "black";
pincel.fillRect(175,110,90,90);
//ojo 1
pincel.fillStyle = "black";
pincel.fillRect(335,110,90,90);
//ojo 2
pincel.fillStyle = "black";
pincel.fillRect(265,200,70,100);
//nariz
pincel.fillStyle = "black";
pincel.fillRect(225,240,40,110);
//boca lado 1
pincel.fillStyle = "black";
pincel.fillRect(335,240,40,110);
//boca lado 2
</script>
<canvas width="600" height="400"> </canvas>
<script>
var escuadra = document.querySelector("canvas");
var pincel = escuadra.getContext("2d");
pincel.fillStyle = "lightblue";
pincel.fillRect(0,0,600,400);
pincel.fillStyle = "black";
pincel.beginPath();
pincel.moveTo(50,50);
pincel.lineTo(50,400);
pincel.lineTo(400,400);
pincel.fill();
pincel.fillStyle = "white";
pincel.beginPath();
pincel.moveTo(100,175);
pincel.lineTo(100,350);
pincel.lineTo(275,350);
pincel.fill();
</script>