HTML

All you need to know about HTML

Canvas

Read this and navigate left side in this doc for next pages
Cheat sheet

HTML Canvas is an HTML element used for graphics to draw shapes. We can define canvas in HTML like any other element and then modify that or use that in JS

We have 2 different APIs in JS that allows us to draw on the canvas element

  • Canvas API - For 2D

  • WebGL API - For 3D

/*HTML*/
<body>
    <canvas id="canvas1"></canvas>
    <script src="index.js"></script>
</body>

Last updated

Was this helpful?