HTML5 canvas using JavaScript

The canvas is HTML5 element used to draw graphics using JavaScript. 

<!DOCTYPE html>
<canvas id="myCanvas" style="border:1px solid #000000;">Your browser does not support the HTML5 canvas tag.</canvas>
var c=document.getElementById('myCanvas');
var ctx=c.getContext('2d');
for (var x = 0, y = 0; x < 150 &amp;&amp; y < 200; x += 50, y += 37) {
var i = x+125;
var color ='FF0'+i;


Demo :

Pankaj Singh Sugara

Author Pankaj Singh Sugara

Experienced Software Engineer with a demonstrated history of working in the marketing and advertising industry. Skilled in SQL, Web Applications, PHP, WordPress, and Joomla. Strong engineering professional with a B-TECH focused in Information Technology from JCDM College of Engineering Sirsa, Haryana.

More posts by Pankaj Singh Sugara