Before going through this article check canvas tag supported browsers list. Canvas tag is useful for drawing pictures on the webpage. In the below example i have shown, how to draw a rectangle on the webpage using plain HTML5 with java script. Canvas tag will take help of java script for drawing pictures.
<html> <head> <title></title> <script type="text/javascript"> function drawing() { var canvasid = document.getElementById('frmcanvas'); var area = canvasid.getContext("2d"); area.fillRect(30, 30, 200, 200); } </script> </head> <body onload="drawing()"> <canvas id="frmcanvas" width="300" height="300"> your browser don't support canvas html tag </canvas> </body> </html>Output:
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.