<!DOCTYPE html>
<html lang="es" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Creeper</title>
</head>
<body>
<canvas id="canvas" width="600" height="400">
<style type="text/css">
canvas{
border: 1px solid black;
}
</style>
</canvas>
<script type="text/javascript" src="creeper.js">
function draw() {
var canvas = document.getElementById('canvas');
if (canvas.getContext) {
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 350, 300);
ctx.fillStyle= 'black';
ctx.fillRect(50,60,90,90);
ctx.fillStyle= 'black';
ctx.fillRect(140,147,70,100);
ctx.fillStyle='black';
ctx.fillRect(210,60,90,90);
ctx.fillStyle='black';
ctx.fillRect(100,190,40,110);
ctx.fillStyle='black';
ctx.fillRect(210,190,40,110);
}
}
draw();
</script>
</body>
</html>