[英]How can I avoid the “Bad value language for attribute name on element meta” HTML validation error?
I'm getting this error when I validate my HTML using the W3C validator : 当我使用W3C验证器验证我的HTML时,我收到此错误:
Bad value language for attribute name on element meta: Keyword language is not registered.
<meta name="language" content="en" />
How can I solve this? 我怎么解决这个问题?
You should specify the language on the HTML tag, like so: 您应该在HTML标记上指定语言,如下所示:
<html lang="en">
You can also ues the lang
attribute on any element, so if you have just one div with French in it, you could do: 你也可以使用任何元素的
lang
属性,所以如果你只有一个包含法语的div,你可以这样做:
<html lang="en">
...
<body>
...
<div lang="fr"></div>
...
</body>
</html>
我想你正在寻找内容语言
<meta http-equiv="Content-Language" content="en" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.