<canvas id="rectangle"></canvas>

<script>
var canvas=document.getElementById('rectangle');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#0000FF';
ctx.fillRect(0,0,180,100);
</script>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.