html5如何进行测试,HTML5

相信大家都知道,如何去一眼识别是否是HTML5标准的HTML文件,那就是去看源代码中的DTD!

如果是,说明就是HTML5标准的HTML代码。但是HTML5是新技术,有些标准自己还是不能完全掌握,所以在编写的时候难免会出现纰漏,所以完成后需要找个人检测一下,这里推荐使用网址:    validator.w3.org!

此网站提供三种检测方式:输入url、上传文件和粘贴源代码,就可以根据返回的错误报告去改编码了。

在检测的时候,遇到了错误:

A meta element with an http-equiv attribute whose value is X-UA-Compatible must have a content attribute with the value IE=edge.

经查询,在stackoverflow.com上是这样说的:

HTML5:The page will validate using the W3 Validator only when using . For other values it will throw the error: A meta element with an http-equiv attribute whose value is X-UA-Compatible must have a content attribute with the value IE=edge. In other words, if you have IE=edge,chrome=1 it will not validate. I ignore this error completely as modern browsers simply ignore this line of code.If you must have completely valid code then consider doing this on the server level. See olibre'sanswer or bitinn's answer for more details on how to do this.

大体意思就是说,在HTML5标准下,只识别IE=edge,其他的都会报上面的错误。

那么IE=EDGE代表什么意思呢?

就是通知 Windows Internet Explorer 以最高级别的可用模式显示内容,这实际上破坏了“锁定”模式。即如果你有IE789,那么就调用高版本的那个兼容,也就是IE9。

26e6ef7877e015294800905ad7a647aa.png

admin134

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值