CREATE A RECTANGLE USING CANVAS ELEMENT
Run
<!DOCTYPE html>
    <head>
        <title>Create a Rectangle in the Canvas</title>
        <style>
        	canvas {
        		border: 1px solid #000;
        	}
        </style>
        <script>
            window.onload = function() {
                var canvas = document.getElementById("myCanvas");
                var context = canvas.getContext("2d");
                context.rect(50, 50, 200, 100); 
                context.fillStyle = "#6a67ce";
                context.fill();
                context.lineWidth = 5;
                context.strokeStyle = "#CCCCCC";
                context.stroke();
            };
        </script>
    </head>
    <body>
        <canvas id="myCanvas" width="300" height="200"></canvas>
    </body>
</html>