< time>的适当datetime属性 [英] Proper datetime attribute for <time>

查看:137
本文介绍了< time>的适当datetime属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然 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
element time :文字不满足时间 - 日期时间格式。

Bad value Mo, Tu, We, Th, Fr 09:00-16:00 for attribute datetime on element time: 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.

这篇关于&lt; time&gt;的适当datetime属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆