开发者

What HTML5 Tags exactly I can use with html5boilerplate?

I am wondering can we use tags like <aside> with Html5Boilerplate. If yes will it browser compatible? and what other tags we can use wi开发者_JAVA百科thout fear of older browsers specially IE7 and IE8


According to the HTML5BoilerPlate site, it includes Modernizr.

Modernizr is a Javascript library that checks the user's browser for compatibility with various features. It also includes a hack which allows IE6/7/8 to support HTML5 tags.

This hack tells IE that the new HTML5 tags are valid HTML. Without it, IE will ignore these tags. With the hack in place, IE will accept those tags as normal HTML.

But note that this in itself doesn't actually add any new features to IE. Therefore, the new semantic tags like <section> and <nav> are fine, but there still wouldn't be any point using tags which provide new HTML5 functionality such as <video> or <canvas>.

Also note that the hack will obviously only work if the end user has Javascript enabled.

See the Modernizr page for more info on how it works and what it does. See also HTML5Shiv, which is a stand-alone version the same hack.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜