【问题标题】:What HTML version is this html这个html是什么HTML版本
【发布时间】:2013-10-11 04:45:10
【问题描述】:

下面的代码sn-p是什么html版本?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="some info here ..." />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

【问题讨论】:

  • 我很确定 建议使用 HTML5
  • HTML 规范有版本。 HTML 文档没有。它只是 HTML。

标签: html doctype


【解决方案1】:

一行一行

&lt;!DOCTYPE html&gt; - HTML5 Doctype

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; - 参考here

&lt;head&gt; - 文档head 元素

&lt;meta name="Generator" content="some info here ..." /&gt; 用于创建 HTML 文档的程序的描述

&lt;meta charset="utf-8" /&gt; - 文档字符编码,Good read

&lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /&gt;Read HereHere


我当然会为每个问题写一个大胖子的描述,但意识到这些问题已经在不同的问题中提出,所以想把它们联系起来,而不是在这里再次重复同样的事情。

【讨论】:

  • 比我的答案更好!
【解决方案2】:

代码 sn-p 主要是 XHTML (XML) 序列化中 HTML5 文档的开头,有时会混淆地称为 XHTML5。

然而,它不是一个合格的文件;当前的HTML5 CR 不允许使用http-equiv="X-UA-Compatible" 属性(基于相当正式的理由,但仍然如此)。

【讨论】:

    【解决方案3】:

    doctype 属于 HTML5 Doctype 定义。

    所以文档的其余部分应该基于 HTML5

    【讨论】:

      猜你喜欢
      • 2010-12-07
      • 2015-08-24
      • 1970-01-01
      • 2019-12-08
      • 1970-01-01
      • 2018-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多