<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Creeper - minecraft</title>
<style>
canvas {
border: solid 1px;
}
body {
text-align: center;
}
</style>
</head>
<body>
<h1>Dibujando a creeper</h1>
<canvas width="600" height="400"></canvas>
<script>
var pantalla = document.querySelector("canvas");
var pincel = pantalla.getContext("2d");
pincel.fillStyle = "darkgreen";
pincel.fillRect(125, 50, 350, 300);
pincel.fillStyle = "black";
pincel.fillRect(175, 100, 90, 95);
pincel.fillStyle = "black";
pincel.fillRect(335, 100, 90, 95);
pincel.fillStyle = "black";
pincel.fillRect(265, 195, 70, 105);
pincel.fillStyle = "black";
pincel.fillRect(220, 242.5, 160, 52.5);
pincel.fillStyle = "black";
pincel.fillRect(220, 242.5, 45, 107.5);
pincel.fillStyle = "black";
pincel.fillRect(335, 242.5, 45, 107.5);
</script>
</body>
</html>