< time>的适当datetime属性 [英] Proper datetime attribute for <time>
问题描述
虽然 Schema.org写道
这是一个例子:
< time itemprop =openingHoursdatetime =Tu,Th 16:00-20:00>星期二和星期四4-8pm< / time>
。
在 HTML5验证器我收到这个错误:
坏价值
Mo,Tu,We,Th,Fr 09:00-16:00
属性datetime
on
elementtime
:文字不满足时间 - 日期时间格式。
Bad value
Mo, Tu, We, Th, Fr 09:00-16:00
for attributedatetime
on elementtime
: The literal did not satisfy the time-datetime format.
…" datetime="Mo, Tu, We, Th, Fr 09:00-16:00">every work day 9am to 16pm </time></li>
我真的想在Microdata中沟通开放时间(和天),但是似乎这与HTML5有冲突。
I really want to communicate the opening hours (and days) in Microdata, but it seems this is in conflict with HTML5.
有没有一个表单在这种情况下,这对双方都有好处,还是应该保留机器人,不要关心这种情况下的有效HTML?
Is there a format that is good for both or I should keep it for the bots and care not about valid HTML in this case?
推荐答案
建议保留你所拥有的,而不用担心HTML验证器,这只是一个指导。
I would suggest to keep what you have and not worry about the HTML validator which is only a guide at any rate.
这篇关于< time>的适当datetime属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!