How to use canvas tag


<button>

All Tags not showing in online page, but show on view source.

<canvas id="ITCanvas"></canvas>
<script type="text/javascript">
var canvas=document.getElementById('ITCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#ff6633';
ctx.fillRect(0,0,100,100);
</script>

Code show like this:


Browser Support

The <canvas> tag is supported in all major browsers.

Attention: Internet Explorer 8 and earlier versions, do not support the canvas tag.

What is canvas tag

Tha canvas tag is using for animation. The canvas tag is used to draw graphics, on the fly, via scripting (usually JavaScript).

Difference in HTML5

The canvas tag is new in HTML5.

Leave a Reply

Your email address will not be published. Required fields are marked *