<canvas width="600" height="400"></canvas>
<script>
var tela = document.querySelector('canvas');
var pincel = tela.getContext ('2d');
pincel.fillStyle = 'darkgreen';
pincel.fillRect(0, 0, 300, 300);
pincel.fillStyle = 'black';
pincel.fillRect(20, 30, 90, 90);
pincel.fillStyle = 'black';
pincel.fillRect(200, 30, 90, 90);
pincel.fillStyle = 'black';
pincel.fillRect(110, 110, 90, 150);
pincel.fillStyle = 'black';
pincel.fillRect(200, 200, 60, 100);
pincel.fillStyle = 'black';
pincel.fillRect(55, 200, 60, 100);
</script>