<!DOCTYPE html>
<html>
<style>
html, body { margin: 0; padding: 0; }
</style>
<body>
<div>
<canvas id="output" width="100" height="100"></canvas>
</div>
<script>
var canvas = document.getElementById('output');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 10, 10);
ctx.fillRect(90, 0, 10, 10);
ctx.fillRect(0, 90, 10, 10);
ctx.fillRect(90, 90, 10, 10);
</script>
</body>
</html>