I am trying to test out the canvas tag, I started with this code:
<html>
<canvas id="example" width="200" height="200">
This text is displayed if your browser does not support HTML5 Canvas.
</canvas>
</html>
In IE8 I get the message:
This text is displayed if your browser does not support HTML5 Canvas.
I then installed IE9 but get the same error. Does IE9 support HTML5 canvas or not?
Edit
The problem was that I was missing the doctype tag
<!DOCTYPE html>
The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images.
HTML5 Canvas is not supported in Internet Explorer browser versions 7 and 8 i.e. IE7 and IE8 and in order to use HTML5 Canvas, Excanvas also known as Explorer Canvas is used.
Additionally, an update planned for the IE9 platform preview will add support for HTML5 video capabilities. "When we started looking deeply at HTML5, we saw that it enabled a whole new class of applications," Hachamovitch said. IE9 will run HTML5 better via GPU acceleration, Hachamovitch said.
For screen readers, IE, Chrome & Firefox support the accessible canvas element sub-DOM.
IE9 does support canvas. Here is an exmaple.
If canvas does not work in your browser, press F12 (open developer tools), and make sure, that IE is not in compatibility mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With