<canvas height="600" width="400"> </canvas>
<script>
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "lightgrey";
pincel.fillRect(0, 0, 600, 400);
// cabeza (parte 1)
pincel.fillStyle = "darkgreen";
pincel.fillRect(25, 50, 350, 300);
// ojos (partes 2 y 3)
pincel.fillStyle = "black";
pincel.fillRect(75, 100, 90, 90);
pincel.fillStyle = "black";
pincel.fillRect(235, 100, 90, 90);
// nariz (parte 4)
pincel.fillStyle = "black";
pincel.fillRect(165, 190, 70, 100);
// parte de la boca (partes 5 y 6)
pincel.fillStyle = "black";
pincel.fillRect(235, 250, 40, 100);
pincel.fillStyle = "black";
pincel.fillRect(125, 250, 40, 100);
</script>