HTML5元验证

发布于 2025-02-09 14:39:58 字数 672 浏览 2 评论 0 原文

我试图制作我的第一个HTML5页面,但我根本无法获得验证 W3C一直告诉我我有一些错误我的元标记。

有问题的页面是 http://www.jmphoto.dk/otus/otus/index.htex.htex.html (这是我试图用作base/redeo作为HTML 5的旧HTML4页面5)

我找不到Anny解决方案来获取以下metatags来验证或找到Anny的替代品,以验证

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />
<meta name="distribution" content="Global" />
<meta name="copyright" content="(c) 2012 OTUS" />

我将在周末使用大部分时间试图验证我的大部分时间在网上找到解决方案,但没有运气,所以我真的希望有人聪明能帮助我。

Im trying to make my first HTML5 page but i simply cant get it to validate
W3C keeps telling me that i have some errors i my meta tags.

the page in question is http://www.jmphoto.dk/otus/index.html (its an old HTML4 page that i try to use as base/redeo as HTML 5)

I cant find anny solution to get the following metatags to validate or find anny substitutes for them that will validate

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />
<meta name="distribution" content="Global" />
<meta name="copyright" content="(c) 2012 OTUS" />

I have used most of the weekend trying to find a solution on the net but with no luck so I realy hope somebody smart can help me with this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

莳間冲淡了誓言ζ 2025-02-16 14:39:58

好的,让我们先以简单的方式来做:

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

最后修改不是,也不是 meta 元素的有效属性。不确定这里的意图。

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />

将缓存说明放入元标签并不是一个好主意,因为尽管浏览器可能会阅读它们,但代理不会。因此,它们是无效的,您应该将缓存说明作为真实的HTTP标头发送。

<meta name="distribution" content="Global" />
<meta name="copyright" content="(c) 2012 OTUS" />

distribution 版权> name meta 元素的属性的属性。有效名称在

我推荐 dcterms.audience 而不是 distribution dcterms.rightss.rights dcterms.rights.rights.rights.rights.rights.rights.rights.rightss.rightss.rightss.rightss.rentss.rightsholder 而不是版权

OK, let's take the easy one first:

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

last-modified is not and has never been a valid attribute of the meta element. Not sure what is intended here.

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />

Putting caching instructions into meta tags is not a good idea, because although browsers may read them, proxies won't. For that reason, they are invalid and you should send caching instructions as real HTTP headers.

<meta name="distribution" content="Global" />
<meta name="copyright" content="(c) 2012 OTUS" />

Neither distribution nor copyright are recognized values for the name attribute of the meta element. Valid names are described at https://w3c.github.io/html/document-metadata.html#standard-metadata-names and http://wiki.whatwg.org/wiki/MetaExtensions.

I recommend dcterms.audience instead of distribution and dcterms.rights dcterms.rightsHolder instead of copyright.

小巷里的女流氓 2025-02-16 14:39:58

您是否阅读了无效标签的验证器消息?它说这些标签包含不良值,所以我猜它们不允许。检查这些链接,阅读验证器消息,然后查看是否可以找到HTML 5的批准标签和属性列表。验证器服务似乎是实验性的,因为HTML 5不在最终形式。

在html5中有效的版权元标记?

http://www.immpressivewebs.com/understanding-html5-validation/

Have you read the validator message for invalid tags? It says that those tags contain bad values so I'm guessing they are not allowed. Check these links, read validator messages and see if you can find a list of approved tags and properties for HTML 5. Validator services seem to be experimental since HTML 5 is not in it's final form.

Is the copyright meta tag valid in HTML5?

http://www.impressivewebs.com/understanding-html5-validation/

饮惑 2025-02-16 14:39:58

meta name =“ Last-Modifed” 的此替代方案已由W3验证器验证为有效的HTML5和可能被现代搜索引擎识别的

<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
<meta name="dcterms.modified" content="2018-01-26" />

This alternative for meta name="last-modifed" is validated by W3 Validator as valid HTML5 and probably recognized by modern search engines:

<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
<meta name="dcterms.modified" content="2018-01-26" />
雨后彩虹 2025-02-16 14:39:58

而不是

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

你需要放

<meta http-equiv="last-modified" content="Thu, 14 Apr 2011 12:17:27 GMT" />

Instead of

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

you need to put

<meta http-equiv="last-modified" content="Thu, 14 Apr 2011 12:17:27 GMT" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文