< Tags
Context 2D
Tag
Context2D is the interface for drawing on a canvas element in HTML. It’s an alternative to SVG for creating visualizations, the same way vector graphics and raster graphics are two different approaches to creating images. Context2D is a raster-based API, which means it draws pixels on a canvas, while SVG is a vector-based API, which means it creates shapes and paths that can be scaled without losing quality. When drawing a lot of elements, Context2D can be more performant than SVG.