I'm creating an HTML 5 chess game. Server side is socket.io / node.js / backbone.js.
I'm now beginning to write the view for the game board. Would it be easier to represent a chess board in canvas or DOM elements (aka divs)? Disregard browser compatibility.
Really comes down to your motives.
If you know game developement well, and you're comfortable with dividing screens into segments for purposes of collision-detection or otherwise, and you can easily create your own custom click events, per square/unit, based on where on the canvas the player clicked, then go with the canvas, as you'll open more doors to advanced animations and graphical-interactions that way.
If you aren't comfortable with that, and would like a straightforward way of knowing which square was clicked, and would like a clean-cut way of knowing if there was a unit in the square you landed on, without having to figure it out based on the X and Y where you clicked inside the game window, then go with the DOM -- really, those are the benefits and most everything else is a side-effect of picking one or the other.
Canvas for animation and "polish", DOM for event-listeners and array-based (or attribute-based) notification of square clicked.
For what you're planning to do, I think DOM would be the best option. Not because Canvas has any drawbacks, but for just based on the amount of work you'd need to be done, and the ability to change how the board looks easily.
You can use div
s and place them absolutely, add css styles to show/hide pieces on a certain square, and after all that, you can even make a large background-less canvas and draw special effects on top of the DOM based chess board.
So all in all, DOM should be the way to go for you.
It depends on your goals.
If your main interest is just to visualize the state of the game by rendering icons for the pieces as images then using the DOM (e.g. tables or divs) for board locations is probably easiest.
If your are more interested in advanced graphicals then canvas might be better.
I've developed one of those quite recently and used HTML5 Canvas for graphical interface. It was extremely powerful for drawing the board and moving the pieces.