The < canvas> element, which came to us in HTML5 was the first step towards HTML5 games becoming big.
The canvas allows so many things that you wouldn't have been able to do otherwise, and does it rather efficiently.
For a start, you could simply write your own 3D engine, which uses normal 2D functions to generate a 3D object and render the 2D projection on the canvas. Doing so just requires a bit of mathematics. But making it a huge and playable game is where it gets difficult.
You could create a whole 3D engine if you wanted, but there are people working on a standard for 3D. It's called WebGL, and it does what I just described, but it simplifies it by allowing you to just call the functions, rather than having to think up all that complicated stuff yourself.
To get started with using the HTML5 Canvas, try this introduction to using the HTML5 Canvas.
And to learn all the basics of making HTML5 games, check out the HTML5 Game Development Guide