Canvas is a technology introduced in HTML5 which can be accessed by the
<!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="200" height="100" style="border:1px solid #000111;"></canvas> </body> </html>
- In the above example, the
"height"attributes are necessary to define the size of the canvas.
- By default,
<canvas>element has no border & no content. So, to add a border we use the
- We can have multiple
<canvas>elements on one HTML page.