微格式语义问题
我正在尝试向我的网站添加微格式,但我仍然对一些事情感到困惑。
微格式是否始终必须位于 hcard 或 vcard 元素内?
我可以在一页上放置多张 hcard 吗?
我可以在 hcard 标签内包含非微格式内容吗?
我正在一个网站上工作,他们的地址位于主页上的两个位置,以及热线电话号码。所以我只是想弄清楚如何放置微格式。
假设所有内容都必须包含在 hcard 元素中,这是否是为热线标注标记我的代码的正确方法?
<p class="hcard">Call us 24 hours a day, 7 days a week at <span class="tel hotline">415.441.KIDS (5437)</span></p>
使用班级“热线”可以吗?我可以将“tel”和“hotline”放在同一个类属性中吗?额外的 24/7 文本位于 hcard 元素内可以吗?最后的字母/数字部分怎么样?
I'm trying to get into adding microformats to my site, but I'm still confused about a couple of things.
Do microformats always have to be within an hcard or vcard element?
Can I have multiple hcards on one page?
Can I have non-microformat content inside an hcard tag?
I'm working on a site and they have their address in two places on their homepage, as well as a callout for a hotline. So I'm just trying to figure out how to place the microformats.
Assuming everything has to be wrapped in an hcard element, would this be the correct way to mark up my code for the hotline callout?
<p class="hcard">Call us 24 hours a day, 7 days a week at <span class="tel hotline">415.441.KIDS (5437)</span></p>
Is using the class "hotline" ok? Can I put both "tel" and "hotline" in the same class attribute? Is it ok that that extra 24/7 text is inside the hcard element? What about the letters/numbers part at the end?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的示例应如下所示:
更改:
< ;abbr>
表示机器可读的值。 (“415.441.KIDS (5437)”并不完全是一个电话号码;它是对电话号码的描述。)是的。
是的。
是的。
否(见上文)。
Your example should look like this:
Changes:
<abbr>
to indicate the machine-readable value. ("415.441.KIDS (5437)" isn't quite a phone number; it's a description of a phone number.)Yes.
Yes.
Yes.
No (see above).
我认为你很困惑。 hcard 是一种特定的微格式(除其他外):
因此,您可以在一个页面中拥有许多 hcard,每个 hcard 代表一个人、一个公司等。例如,在您公司的站点中,一个代表每个办公室或组织中的人员
I think you are confused. hcard is one specific microformat (among others):
Therefore you can have many hcards in a page, each representing one people, company, etc. E.g. in your company's site, one for each office or for people in the organisation