Front-end Learning Record (6): Browser Compatibility Issues About Some H5 New Elements

This paragraph is taken from W3SCHOOL:

        All modern browsers support HTML5, but some older browsers cannot. All browsers, old and new, will automatically treat unrecognized elements as inline elements. Because of this, you can help older browsers deal with "unknown" HTML elements. HTML5 defines eight new semantic  HTML elements. All are block-level elements. You can set the CSS  display  property to  block to ensure correct behavior in older browsers

header, section, footer, aside, nav, main, article, figure {
    display: block; 

}

Internet Explorer 8 and earlier did not allow styling of unknown elements. Fortunately, Sjoerd Visscher created "HTML5 Enabling JavaScript", "the shiv":

The solution is to use commented code to put old browser -readable content:

<!--[if lt IE 9]>

  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->

The above code is a comment, but earlier versions of IE9 will read it (and understand it).

Links referencing shiv code must be in the <head> element, because Internet Explorer needs to recognize all new elements before reading them.

For details, please click here to see W3SCHOOL!


HTML5 adds a lot of form attributes, which can enrich the user's input and validation of forms. Internet Explorer 9 and earlier versions do not support the autofocus attribute of the input tag.

About the input properties of the form see here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325570136&siteId=291194637