<canvas width="400" height="400" ></canvas>
<script>
var tela = document.querySelector('canvas');
var pincel = tela.getContext('2d');
pincel.fillStyle = 'green';
pincel.fillRect(0, 0, 400, 400);
pincel.fillStyle = 'black';
pincel.fillRect(70, 100, 100, 100);
pincel.fillStyle = 'black';
pincel.fillRect(230, 100, 100, 100);
pincel.fillStyle = 'black';
pincel.fillRect(165, 200, 70, 70);
pincel.fillStyle = 'black';
pincel.fillRect(100, 250, 200, 70);
pincel.fillStyle = 'black';
pincel.fillRect(100, 250, 70, 200);
pincel.fillStyle = 'black';
pincel.fillRect(230, 250, 70, 200);
</script>