An excellent article discusses about using HTML5 canvas for building browser based games using only HTML and Javascript. The <canvas> element is used to draw graphics, on the fly, on a web page.

The power of HTML5 Canvas is that you can draw any 2D or 3D content within the canvas region using powerful HTML5 Javascript API’s.

Recommend reading article which would give you good understanding on HTML5 Canvas.

Some other resources for learning