in HTML by
Q:

What is Canvas in HTML5 ? How to write a Canvas ?

► Click here to show 1 Answer

0 votes
by

Canvas is a element of HTML5 which uses JavaScript to draw graphics on a web page. A canvas is a rectangular area. Each and every pixel of it can be controlled by us. There are several methods for drawing paths, boxes, circles, characters, and adding images by using canvas.

To add canvas tag to our HTML document we need id, width and height. Below is the example how to write a basic canvas tag to your HTML document.

<canvas id="myFirstCanvas" width="100" height="100"> </canvas>

HTML
Learn More with Madanswer

Related questions

0 votes
asked Oct 23, 2019 in HTML by AdilsonLima
...