Search code examples
htmlcanvasseocross-browser

What about creating the whole website within a CANVAS?


I am designing a new website from scratch and wondered what cons could have in developing the whole site within a <canvas> element.

I am aware of compatibility issues with IE6/7/8 but that's not important for this project. But I do care, for example, the Google search engine behavior and mobile compatibility.

The main reason why I chose this way is to have the possibility to code advanced effects and animations over elements and pictures which are not possible with pure HTML5/CSS.


Solution

  • Canvas is an element for raster graphics. It's good for parts of the page, but not for whole page. Page is document. It needs to be machine readable too. If your whole website consists of canvas, then search engine bots, screen readers, browsers plugins, and other bits of software won't be able to access it. Creating a website with canvas is like preparing a document with paint program instead of word processor. It's possible but not practical. Could be a good idea for an experiment, but if you are doing this for production, then you should re-consider.