<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(50, 40, 110, 110);
pincel.fillStyle = 'Black';
pincel.fillRect(240, 40, 110, 110);
pincel.fillStyle = 'Black';
pincel.fillRect(160, 150, 80, 150);
pincel.fillStyle = 'Black';
pincel.fillRect(90, 210, 70, 190);
pincel.fillStyle = 'Black';
pincel.fillRect(240, 210, 70, 190);
pincel.fill();
</script>