Captivating Canvas (Part 1)
🌟CAPTIVATING C A N V A S 🌟 PART - 1 Objectives: After reading and writing the codes on your own, you will be able to: Render 2D graphics on your webpage. Draw paths and rectangles using <canvas> element. Pre-Requisite: Basic knowledge of HTML. CSS Basic Javascript. DOM manipulation (DOM and BOM webAPIs) LET'S START CODING <canvas> is an HTML element which can be used to draw graphics via scripting (usually JavaScript). This can, for instance, be used to draw graphs, combine photos, or create simple animations. The default size of the canvas is 300 pixels × 150 pixels (width × height) . But custom sizes can be defined using the HTML height and width property. In order to draw graphics on the canvas we use a JavaScript context object, which creates graphics spontaneously when needed. <canvas> element : ...