# UI in Canvas-Games [closed]

I am quite new to programming with <canvas/> and WebGL, but very familiar in HTML5. So far, I have made to render some entities on the <canvas/>. Next would be to add a simple HUD to it.

I wonder, though, would it be a good idea to use HTML-tags for the HUD and UI elements? That would make them a lot easier to create, but perhaps that would have a big impact on performance. Is it worth to make a <canvas/>-Only HUD engine?

I'm even tempted to replace the sprites with <div/>-Elements, since they're only rotated and moved, so perhaps a css-rotation is better suited?

• Questions like this are ones you really need to answer for yourself -- they are very broad and discussion oriented in general, and usually the only way to scope them down is to have extensive knowledge of the problem domain (that is, your project). Is there a specific problem you are having with using HTML for the UI? Perhaps consider asking about that instead. – user1430 Jan 6 '14 at 16:32
• Seconded. What performance problems are you seeing mixing DOM and canvas? Consider asking about those instead. – drhayes Jan 6 '14 at 16:35