HTML and CSS Reference
In-Depth Information
CSS, HTML5, and JavaScript does. IE9 works like the other
browsers and doesn't need JavaScript.
Although this JavaScript is unnecessary for other brows-
ers, it won't cause them any harm. However, you might wish
to give your page a speed optimisation and only download
and execute this script in IE by surrounding it with condi-
tional comments (see
supporting-ie-with-conditional-comments/ ) .
NoTE The <script>
element no longer requires
you to specify the type of script;
JavaScript is assumed by
default. This works on legacy
browsers also so you can use it
right away.
Enabling Script
Alternatively, you can use Remy's tiny HTML5-enabling script that will per-
form this for all new elements in one fell swoop, and which also includes
Jon Neal's IE Print Protector ( ) that
ensures that HTML5 elements also appear styled correctly when print-
ing documents in IE.
A user with JavaScript turned off, whether by choice or corpo-
rate security policy, will be able to access your content but will
see a partially styled or unstyled page. This may or may not be
a deal-breaker for you. (A user with ancient IE and no JavaScript
has such a miserable web experience, your website is unlikely
to be the worst they encounter.) Simon Pieters has shown
that, if you know what the DOM looks like, you can style some
HTML5 without JavaScript but it's not particularly scalable or
maintainable; see “Styling HTML5 markup in IE without script”
at .
Other legacy browser problems
There are other legacy browser problems when styling HTML5.
Older versions of Firefox (prior to version 3) and Camino (before
version 2) had a bug that
get-html5-working-in-ie-and-irefox-2/ has dealt with.
We don't propose to compose an exhaustive list of these
behaviours; they are temporary problems that we expect to
quickly disappear as new browser versions come out and users
upgrade to them.
Search WWH ::

Custom Search