Home  >  Article  >  Web Front-end  >  How to write HTML5 declaration that it is compatible with IE_html5 tutorial skills

How to write HTML5 declaration that it is compatible with IE_html5 tutorial skills

WBOY
WBOYOriginal
2016-05-16 15:51:061237browse

is a statement of HTML5. Among mainstream browsers, only IE8 and below versions do not support it, so IE will enter Quirks mode. However, subsequent declarations can force IE's rendering mode to be specified, so the declaration has no effect on IE.

HTML5 is not as strict as XHTML. For general xhtml pages, it basically cannot pass the W3C verification standard, but after changing to HTML5 declaration, it can basically pass.


Copy code
The code is as follows:










< ;![endif]–>

About X-UA-Compatible
Currently most websites use



as a compatibility method for IE8. Although Microsoft has taken IE a big step towards the standard, in fact IE8 still has a series of strange rendering phenomena. An indisputable fact.
Who made IE6 so popular? Maybe after 2014 we can have more time to care about IE8 instead of IE6 or IE7.
The methods available in X-UA-Compatible are:

Copy the code
The code is as follows:





[html]
The last line always displays the web page in the latest IE version mode.
Also add
[code]



After using Emulate mode, more attention will be paid to

So for now, cloud downloading It is still recommended to copy the code as follows: ="X-UA-Compatible" content="IE=EmulateIE7" >

is the first choice.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn