<meta charset="utf-8">
<canvas width="600" height="400">
</canvas>
<script>
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "lightgrey" //Propiedad
pincel.fillRect(0,0,600,400) //Funcion
pincel.fillStyle= "darkgreen";
pincel.fillRect(125,50,350,300);
pincel.fillStyle= "black";
pincel.fillRect(175,100,90,90);
pincel.fillStyle= "black";
pincel.fillRect(335,100,90,90);
pincel.fillStyle= "black";
pincel.fillRect(265,190,70,100);
pincel.fillStyle= "black";
pincel.beginPath()
pincel.moveTo(265,240);
pincel.lineTo(225,240);
pincel.lineTo(225,350);
pincel.lineTo(265,350);
pincel.fill();
pincel.fillStyle= "black";
pincel.beginPath()
pincel.moveTo(335,240);
pincel.lineTo(375,240);
pincel.lineTo(375,350);
pincel.lineTo(335,350);
pincel.fill();
</script>