我正在考虑将用 XHTML 1.0 编写的页面迁移到 HTML 5,并且正在考虑在元素中包含meta
标签时的最低要求。<head>
例如,我当前符合 XHTML 1.0 的页面具有以下meta
标签
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta http-equiv="content-language" content="en-us" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="copyright" content="© 2012" />
<meta name="robot" content="noindex, nofollow" />
以下内容对于 HTML 5 是否足够,我还可以包含它们吗?
我的理解也是,该meta
元素<meta http-equiv="content-language" content="en-us" />
现在可以全局应用于该 <html>
元素。
<html lang="en-us">
<head>
<meta charset="UTF-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="copyright" content="©" />
<meta name="robot" content="noindex, nofollow" />
<title>sample code</title>
</head>
</html>