Fallback content HTML5

Because the <canvas> element is still relatively new and isn’t implemented in some browsers (such as Internet Explorer versions below IE9), we need a means of providing fallback content when a browser doesn’t support the element.
This is very straightforward: we just provide alternative content inside the canvas element. Browsers which don’t support <canvas> will ignore the container and render the fallback content inside it. Browsers which do support <canvas> will ignore the content inside the container, and just render the canvas normally.
For example, we could provide a text description of the canvas content or provide a static image of the dynamically rendered content. This can look something like this :


<canvas id="stockGraph" width="150" height="150"> 
 current stock price: $3.15 +0.15 

<canvas id="clock" width="150" height="150"> 
<img src="images/sample.jpg" width="150" height="150" alt=""/> 

You may also like...