I appreciate that there is a certain sense of accomplishment that comes with doing something 'from scratch' but why wouldn't you use https://phaser.io/ or any of the other libraries/frameworks for HTML5 development? It's built for almost exactly this type of game.
Does anyone know if there is a framework for turn based strategy for HTML5? Phaser seems to have more of a real time and physics focus.