<p>Create the canvas</p>
<canvas id="Mycanvas" width="400" height="300">

</canvas>

<p>Then write a simple JavaScript to draw on the canvas.</p>

var Mycanvas = document.getElementById('Mycanvas');

var contex = Mycanvas.getContext('2d');

contex.fillStyle = 'blue';

contex.fillRect(40, 40, 350, 200);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.