views:

29

answers:

2

So yeah.. firefox 3 isn't compatible with html5 tags. How would one get around this without recoding everything? You know, like IE's conditional statement or some such.

A: 

You'd have to do some basic browser detection. There's two ways of going about it: testing if a particular feature is available, or doing some analysis of the browser's ID string.

Check out http://www.html5test.com/ and analyze their JS/html code for ideas.

Marc B
how do I go about running that test? (for features)
Chris Bolton
`el = document.createElement('somehtml5specifictag');`. If el's null, then that tag isn't supported and you can do something else in your scripts/css.
Marc B
+1  A: 

The only thing you need do is add 'display:block' to their CSS. Otherwise, FF works just fine with HTML5.

Rob