11.31. HTML5 browser support

发布时间 : 2025-10-25 13:33:09 UTC      

Page Views: 10 views

You can get some older browsers (which don’t support HTML5) to support HTML5.

11.31.1. HTML5 browser support

Modern browsers support HTML5.

In addition, all browsers, both old and up-to-date, automatically treat unrecognized elements as inline elements.

Because of this, you can “teach” browsers to deal with “unknown” HTML elements.

You can even teach IE6 (Windows XP 2001) browsers to handle unknown HTML elements.

11.31.2. Define a HTML5 element as a block element

HTML5 defines eight new HTML semantic elements. All these elements are block-level elements.

In order for older browsers to display these elements correctly, you can set the CSS’s display property value is block :

Example

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

11.31.3. Add a new element to HTML

You can do it for HTML add a new element.

The instance directs to HTML add a new element and define a style for the element, named :

Example

    Add new elements to HTML     

My first title

My first paragraph.

My first new element

JavaScript statement document.createElement("myHero") is to add a new element to the IE browser.

11.31.4. Internet Explorer browser issu

You can use the above methods to add for IE browsers HTML5 element, but:

Browsers of Internet Explorer 8 and earlier IE versions do not support the above methods.

We can use “HTML5 Enabling JavaScript”, “shiv” created by Sjoerd Visscher to solve this problem:

 

The above code is a comment that reads when the version of the IE browser is less than IE9 html5.js file and parse it.

Note: domestic users please use the static resource library of this site (Google resource library is unstable in China):

 

For IE browsers html5shiv is a better solution. html5shiv the main problem is that the new elements proposed by HTML5 are not recognized by IE6-8, these new elements can not be used as parent nodes to wrap child elements, and the CSS style can not be applied.

11.31.5. Perfect Shiv solution

Example

Rendering HTML5

My First Article

Rookie Tutorial —— Learning is not only about technology, but also about dreams!!!

html5shiv.js the reference code must be placed in the element, because the IE browser needs to load the file before parsing the new HTML5 element.

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。