HTML5 Canvas

  • Allows to render 2D shapes or graphics on web page with help of JavaScript.
  • Allows creating animation.

<canvas id="myCanvas" width="200" height="200"></canvas>
<script>
    var c=document.getElementById("myCanvas");
    var ctx=c.getContext("2d");
    ctx.fillStyle="#00FF00";
    ctx.fillRect(0,0,250,250);
</script>

About the Author

aditya bajaj
Music and Blogging get my love.

Be the first to comment on "HTML5 Canvas"

Leave a comment

Your email address will not be published.


*