我试图制作我的第一个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.
发布评论
评论(4)
好的,让我们先以简单的方式来做:
最后修改
不是,也不是meta
元素的有效属性。不确定这里的意图。将缓存说明放入元标签并不是一个好主意,因为尽管浏览器可能会阅读它们,但代理不会。因此,它们是无效的,您应该将缓存说明作为真实的HTTP标头发送。
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:
last-modified
is not and has never been a valid attribute of themeta
element. Not sure what is intended here.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.
Neither
distribution
norcopyright
are recognized values for thename
attribute of themeta
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 ofdistribution
anddcterms.rights
dcterms.rightsHolder
instead ofcopyright
.您是否阅读了无效标签的验证器消息?它说这些标签包含不良值,所以我猜它们不允许。检查这些链接,阅读验证器消息,然后查看是否可以找到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/
meta name =“ Last-Modifed”
的此替代方案已由W3验证器验证为有效的HTML5和可能被现代搜索引擎识别的:This alternative for
meta name="last-modifed"
is validated by W3 Validator as valid HTML5 and probably recognized by modern search engines:而不是
你需要放
Instead of
you need to put