1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<!--[if IE 7]>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<![endif]-->
<!--[if IE 6]>
<meta http-equiv="X-UA-Compatible" content="IE=6" />
<![endif]-->

  <!DOCTYPE html>是HTML5的声明,主流的游览器中只有IE8及以下版本不支持,这样IE会进入Quirks模式。但之后的声明可以强制指定IE的呈现模式,所以<!DOCTYPE html>声明对IE就无影响。 

 
HTML5并没有XHTML那么严格,对于一般的xhtml页面,基本都不通完全通过W3C验证标准,而改为HTML5声明后基本都能过。
1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<!--[if IE 7]>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<![endif]-->
<!--[if IE 6]>
<meta http-equiv="X-UA-Compatible" content="IE=6" />
<![endif]-->

  <!DOCTYPE html>是HTML5的声明,主流的游览器中只有IE8及以下版本不支持,这样IE会进入Quirks模式。但之后的声明可以强制指定IE的呈现模式,所以<!DOCTYPE html>声明对IE就无影响。 

 
HTML5并没有XHTML那么严格,对于一般的xhtml页面,基本都不通完全通过W3C验证标准,而改为HTML5声明后基本都能过。

相关文章:

  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案