Table of contentsIntroductionThe basics of using canvasThe 2D context APIBasic lines and strokesPathsInserting imagesPixel-based manipulationTextShadowsGradientsSummaryIntroductionThe HTML5 specification includes lots of new features, one of which is the canvas element. HTML5 canvas gives you an easy and powerful way to draw graphics using JavaScript. For each canvas element you can use a "context