Is it possible to markup a business' contact details using hCard? A name apparently is required in hCard: http://microformats.org/wiki/hcard-authoring#The_Importance_of_Names (e.g. John Doe). I'm trying to mark up just a business' contact details. Is hCard useless to me?

有帮助吗?

解决方案

An hCard has to have a name, but it doesn't have to be the name of a person; you can use hCard for organizations with markup like this:

<div class="vcard"><span class="fn org">Technorati</span></div>

Presumably the business whose contact details you're trying to mark up does have a name.

其他提示

Well, think of it. Why do you want to code it up as hCard? Because it allows other programs to automatically convert it to other formats or consume it otherwise. E.g., an hCard can be converted to a vCard instance in an address book.

Of what use would be an address book item without name? So, to come back, what use would have using hCard, when processing software can't gain something from it?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top