<canvas width="600" height="400"></canvas>
<script>
var screen = document.querySelector("canvas");
var pincel = screen.getContext("2d");
pincel.fillStyle = "yellow"
pincel.fillRect(0,0,600,200);
pincel.fillStyle = "blue";
pincel.fillRect(0,200,600,100);
pincel.fillStyle = "red";
pincel.fillRect(0,300,600,100);
</script>