Direction: Choose the correct option
Q1.
What is the <canvas> element in HTML?
Direction: Choose the correct option
Q2.
<canvas id="myCanvas" width="200" height="100"></canvas>What are the width and height attributes for?Direction: Choose the correct option
Q3.
How do you draw on a canvas?
Direction: Choose the correct option
Q4.
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'red';
ctx.fillRect(10, 10, 50, 50);What does this code do?Direction: Choose the correct option
Q5.
What happens if you don't specify width and height on canvas?
