If I'm already using Modernizr, will I then even need HTML5 Shiv?

橙三吉。 提交于 2019-12-02 17:37:16

1) If I'm already using Modernizer then even will I need HTML5 Shiv to enable HTML5 tag supports for IE.

You don't need to separately include html5shiv, because Modernizr includes it:

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

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


2) and is HTML5 Shiv only for IE or for all browser who don't have native HTML 5 support. like older version of Firefox, Safari, Chrome etc.

It's only for Internet Explorer.

Older versions of other browsers don't need it: http://caniuse.com/html5semantic

And the recommended snippet to include it is:

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

Which will only ever run for IE less than 9.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!