I want to start making games for the web. Can I focus mostly on JavaScript, or do I need to learn HTML and CSS in depth first?
How much HTML and CSS do I need for a browser game?
Answers
If your game draws everything into a canvas, you can start with very little HTML and CSS. You mainly need a page that includes the canvas, plus enough styling to size and position it. The game rules, input, and drawing are usually handled in JavaScript.
Reply to this answer
You may not need to write much code at all if you use an engine that can export to the web. You will still need a basic way to host the exported files, but the engine can handle most of the game itself.
Reply to this answer
It depends on how the game is built. A canvas or engine-based game keeps the HTML and CSS light. If the interface uses ordinary web elements, though, you will want more CSS for menus, layout, resizing, and accessibility. You can learn that as the project calls for it.
Reply to this answer
Learn the basics, not every corner of the web stack. Being able to read a simple HTML page and adjust CSS for centering, sizing, and mobile screens will save you time, then you can put most of your effort into the game tools and language you chose.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions