🎨 HTML Canvas Tutorial

The <canvas> element is a drawable region where you can render graphics with JavaScript — shapes, text, images, animations, even games!

🟥 Drawing a Rectangle

✏️ fillRect(x, y, width, height) draws a solid rectangle.

⭕ Drawing a Circle

🌀 arc(x, y, radius, startAngle, endAngle) is how you draw circles.

🖌️ Drawing Lines

✍️ Use moveTo(x, y) to set starting point, then lineTo(x, y) to draw.

🧑‍🎨 Canvas Tips