Q1. What is the <canvas> element?
<canvas> creates a drawable region for graphics via JavaScript, with specified width and height.
Q2. How do you draw on a canvas?
Get the canvas context with getContext('2d'), then use methods like fillRect(), stroke(), fillText().
Q3. What is the default canvas size?
If width and height aren't specified, canvas defaults to 300px width and 150px height.
Q4. What methods draw basic shapes?
fillRect(x,y,w,h) for filled rectangle, strokeRect() for outline, fillText() for text, beginPath() for custom paths.
Q5. How do you set colors in canvas?
Use fillStyle and strokeStyle properties with color values, and globalAlpha for transparency.
