If I already use Modernizr, will I need HTML5 Shiv then?

1) If I already use Modernizr, will I need HTML5 Shiv to enable HTML5 tag support for IE?

2) Is HTML5 Shiv only for IE or for all browsers that don't have native HTML 5 support? Like older versions of Firefox, Safari, Chrome, etc.

+45
javascript cross-browser html5 css3 modernizr
Jul 30 '11 at 12:09
source share
1 answer

1) If I already use Modernizer, then I will even need HTML5 Shiv to enable HTML5 tag support for IE.

You do not need to separately include html5shiv , as Modernizr includes:

As in Modernizr 1.5, this script is identical to that used in the popular html5shim / html5shiv library.

http://www.modernizr.com/docs/#html5inie




2) and it is HTML5 Shiv only for IE or for all browsers that do not have support for native HTML 5. as an older version of Firefox, Safari, Chrome, etc.

This is for Internet Explorer only.

Older versions of other browsers do not need it: http://caniuse.com/html5semantic

And the recommended snippet for inclusion:

<!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> 

which will only run for IE less than 9.

+68
Jul 30 '11 at 12:12
source share



All Articles