Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65391

IE9 Support for HTML5 Canvas tag

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>

Upvotes: 20

Views: 36455

Answers (5)

Ajay Bhosale
Ajay Bhosale

Reputation: 2002

Extending the answer from gor, make sure that you have added following metadata.

<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

This will force IE to use the latest mode as possible and users don't need to change the compatibility mode from developer tools.

Upvotes: 12

Ken Griffith
Ken Griffith

Reputation: 41

If you install the Google Chrome Frame Plugin [http://www.google.com/chromeframe][1], it upgrades IE6-9 to run the webkit rendering engine - along with HTML5/CSS3 support.

Upvotes: 0

Steve
Steve

Reputation: 566

Just an add on to this there's a little script I've been using called excanvas that has allowed me to run canvas animations (slowly) on IE8, haven't tried it on 7 and 6 but it's worth a look.

Upvotes: 1

user525192
user525192

Reputation:

As far as I'm aware HTML 5 Canvas support is under development for IE9, unless it is already in the RC.. Perhaps not the best website to find out you could browse to html5test with IE9 to see if it supports certain HTML 5 tags or not. As an alternative you can browse to caniuse which should also give you alot of info regarding the HTML5 support of browsers .

Upvotes: 3

gor
gor

Reputation: 11658

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.

Upvotes: 21

Related Questions