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