User:BenWard/drafts/hcard: Difference between revisions
(Copied hCard Spec 2009-12-26 as a base) |
(First pass. Restructured the property listing, redid the intro.) |
||
Line 1: | Line 1: | ||
<entry-title>hCard 1.0 — BenWard Edition</entry-title> | <entry-title>hCard 1.0 — BenWard Edition</entry-title> | ||
''This page is a draft reworking on the hCard specification by Ben Ward. It is an attempt to better present the spec to make it easier to understand and more complete. You should not refer to this document or work from it. See the [[hcard|hCard Specification]].'' | |||
<dfn>hCard</dfn> is a simple, open, distributed format for representing people, companies, organizations, and places, using a 1:1 representation of vCard ([[rfc-2426|RFC2426]]) properties and values in [[semantic-xhtml|semantic HTML or XHTML]]. hCard is one of several open [[microformats|microformat]] standards suitable for embedding in HTML, XHTML, Atom, RSS, and arbitrary XML. | <dfn>hCard</dfn> is a simple, open, distributed format for representing people, companies, organizations, and places, using a 1:1 representation of vCard ([[rfc-2426|RFC2426]]) properties and values in [[semantic-xhtml|semantic HTML or XHTML]]. hCard is one of several open [[microformats|microformat]] standards suitable for embedding in HTML, XHTML, Atom, RSS, and arbitrary XML. | ||
Line 11: | Line 12: | ||
; Authors: [http://tantek.com/ Tantek Çelik] (affiliations above) | ; Authors: [http://tantek.com/ Tantek Çelik] (affiliations above) | ||
: <span class="vcard"><span class="fn">[[User:Brian|Brian Suda]]</span> (<span class="url">http://suda.co.uk/</span>)</span> | : <span class="vcard"><span class="fn">[[User:Brian|Brian Suda]]</span> (<span class="url">http://suda.co.uk/</span>)</span> | ||
: <span class="vcard"><span class="fn">[[User:BenWard|Ben Ward]]</span> (<span class="url">http://benward.me/</span>)</span> | |||
; Acknowledgments: See [[hcard#Inspiration_and_Acknowledgments|acknowledgments]]. | ; Acknowledgments: See [[hcard#Inspiration_and_Acknowledgments|acknowledgments]]. | ||
Line 17: | Line 18: | ||
== Status == | == Status == | ||
hCard | |||
''hCard is a microformats.org specification.'' | |||
=== Available languages === | === Available languages === | ||
The English version of this specification is the only normative version. For translations of this document see the [[#translations]] section. | The English version of this specification is the only normative version. For translations of this document see the [[#translations]] section. | ||
=== Errata and Updates === | === Feedback, Errata and Updates === | ||
* Public discussion on hCard takes place on [[hcard-feedback]], the [[irc|#microformats irc channel]] on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-discuss/ microformats-discuss mailing list]. | |||
* Known errors and issues in this specification are corrected on [[hcard-issues-resolved|resolved issues]] and [[hcard-issues-closed|closed issues]] pages. | |||
* New issues must be documented on [[hcard-issues|issues]]. | |||
== Introduction == | == Introduction and Purpose== | ||
Across the web—on blogs, newspapers, and discussion forums—people identify themselves by name, discuss friends, family and colleagues, and reference businesses and places. By adding structured mark-up to their web pages, these writers and publishers can refer to people, organizations and places in such a way that software (spiders, aggregators and web browsers) can extract this information, transform it, or expose it to users in useful ways. | |||
This specification introduces the | This specification introduces the <dfn>hCard</dfn> format, a 1:1 representation of the properties and values of the vCard standard ([[rfc-2426|RFC2426]]), in semantic HTML. hCard enables applications to retrieve information directly from web pages, without referencing a separate file. | ||
{{rfc-2119-intro}} | {{rfc-2119-intro}} | ||
== Format == | == Format == | ||
=== In General === | === In General === | ||
The vCard standard ([[rfc-2426|RFC2426]]) forms the basis of hCard. | The vCard standard ([[rfc-2426|RFC2426]]) forms the basis of hCard. | ||
hCard uses vCard object, property and value names in lowercase as class names, and maps the nesting of vCard objects to nested HTML elements. | |||
=== Root Class Name === | === Root Class Name === | ||
The root class name for an hCard is | |||
The root class name for an hCard is <code>vcard</code>. An element with a class name <code>vcard</code> is the root node of an <dfn>hCard</dfn> object. | |||
=== Properties and Sub-properties === | === Properties and Sub-properties === | ||
The properties of an hCard are represented by elements inside the hCard, mapped to the vocabulary using the <code>class</code> attribute. The content of the an element with a class name of an hCard property, represents the value of that property. Some properties have sub-properties; sub-properties are represented by elements nested within a parent property element. | |||
hCard properties | |||
''' | === The hCard Vocabulary === | ||
Required fields are noted as such, but note that some required properties can be implied by special optimization patterns (see below.) | |||
; '''<code>fn</code>''' | |||
: ''Required'' | |||
: The ''formatted-name'' of the hCard object. | |||
; '''<code id="property-list-n">'''n'''<sup class="footnote">[[#note1|1]]</sup></code>''' | |||
: ''Required'' | |||
: A person's name | |||
:; Sub-properties of <code>n</code>: | |||
:: <code>family-name</code> | |||
:: <code>given-name</code> | |||
:: <code>additional-name</code> | |||
:: <code>honorific-prefix</code> | |||
:: <code>honorific-suffix</code> | |||
; <code>adr</code> | |||
: A postal address | |||
:; Sub-properties of <code>adr</code> | |||
:: <code>post-office-box</code> | |||
:: <code>extended-address</code> | |||
:: <code>street-address</code> | |||
:: <code>locality</code> | |||
:: <code>region</code> | |||
:: <code>postal-code</code> | |||
:: <code>country-name</code> | |||
:: <code>type</code> | |||
::; <code>label</code> | |||
::: A unstructured form of an address, as it would be presented on an address label. You can also use <code>label</code> to mark up entire addresses in situations where you do not have structured address data available. | |||
; <code>agent</code> | |||
: Another person (nested hCard) authorized to represent this first hCard. For instance, a secretary or PR contact. | |||
; <code>bday</code> | |||
: The birth date of the the entity represented by this hCard | |||
; <code>category</code> | |||
: Arbitrary keywords that may group this hCard with others. See also: [[rel-tag|tagging]]. | |||
; <code>class</code> | |||
: WHAT IS THIS? | |||
; <code>email</code> | |||
: An email address | |||
: An hCard may contain multiple <code>email</code> properties. | |||
:; Sub-properties of <code>email</code> | |||
:: <code>type</code> | |||
::; <code>value</code> | |||
::: ''Required.'' | |||
::: Where no sub-properties are specified for <code>email</code>, <code>value<code> is implied. | |||
; geo | |||
: Decimal geographic co-ordinates representing the current location of the entity represented by the hCard. | |||
:; Sub-properties of <code>geo</code> | |||
:: <code>latitude</code> | |||
:: <code>longitude</code> | |||
: See also: [[geo|Geo microformat]] | |||
; <code>key</code> | |||
; <code>logo</code> | |||
: A logo graphic associated with this entity. e.g. the logo graphic of a business, or an avatar associated with a discussion-board user. | |||
; <code>mailer</code> | |||
; <code>nickname</code> | |||
: | |||
; <code>note</code> | |||
; <code>org</code> | |||
: The name and unit of the organisation for this hCard. | |||
: If no sub-properties are specified, <code>organization-name</code> is implied. | |||
:; Sub-properties of <code>org</code> | |||
:: <code>organization-name</code> | |||
:: <code>organization-unit</code> | |||
; <code>photo</code> | |||
: A photograph of the entity represented by this hCard. | |||
; <code>rev</code> | |||
: The date (and optionally time) in ISO format that the hCard was last revised. | |||
; <code>role</code> | |||
: The occupational role of the person represented by this hCard. | |||
; <code>sort-string</code> | |||
; <code>sound</code> | |||
; <code id="property-list-tel">tel<sup class="footnote">[[#note2|2]]</sup></code> | |||
:; Sub-properties of <code>tel</code> | |||
:: <code>type</code> | |||
:: <code>value</code> | |||
; <code>title</code> | |||
: The job-title of the person represented by this hCard | |||
; <code>tz</code> | |||
: The time-zone the person represented by this hCard is currently located in. | |||
; <code>uid</code> | |||
: A unique identifier associated with this entity | |||
; <code>url</code> | |||
: A URL associated with this entity. | |||
: There may be multiple URL properties on an hCard object. | |||
=== Property Notes === | === Property Notes === | ||
<span id="note1">[[#property-list-n|1. ^]]</span>: The 'n' property is {{optional}} if any [[hcard#Implied_.22n.22_Optimization|implied 'n' optimization rules]] are in effect.<br /> | <span id="note1">[[#property-list-n|1. ^]]</span>: The 'n' property is {{optional}} if any [[hcard#Implied_.22n.22_Optimization|implied 'n' optimization rules]] are in effect.<br /> | ||
<span id="note2">[[#property-list-tel|2. ^]]</span>: tel - Authors {{may}} follow the [http://en.wikipedia.org/wiki/E.123 E.123] standard for writing values of telephone numbers. Letter values (e.g. +1-555-FORMATS) {{must}} be converted to numbers. Use an <code>abbr</code> to display letters and provide a numerical value simultaneously, e.g. <code><nowiki><abbr title="+15553676287">+1-555-FORMATS</abbr></nowiki></code>. | <span id="note2">[[#property-list-tel|2. ^]]</span>: tel - Authors {{may}} follow the [http://en.wikipedia.org/wiki/E.123 E.123] standard for writing values of telephone numbers. Letter values (e.g. +1-555-FORMATS) {{must}} be converted to numbers. Use an <code>abbr</code> to display letters and provide a numerical value simultaneously, e.g. <code><nowiki><abbr title="+15553676287">+1-555-FORMATS</abbr></nowiki></code>. |
Latest revision as of 22:51, 26 December 2009
<entry-title>hCard 1.0 — BenWard Edition</entry-title> This page is a draft reworking on the hCard specification by Ben Ward. It is an attempt to better present the spec to make it easier to understand and more complete. You should not refer to this document or work from it. See the hCard Specification.
hCard is a simple, open, distributed format for representing people, companies, organizations, and places, using a 1:1 representation of vCard (RFC2426) properties and values in semantic HTML or XHTML. hCard is one of several open microformat standards suitable for embedding in HTML, XHTML, Atom, RSS, and arbitrary XML.
Want to get started with writing an hCard? Use the hCard creator to write up some contact information and publish it, or follow the hCard authoring tips to add hCard markup to your current contact page.
- Editor
- Tantek Çelik (http://tantek.com/, and before at Technorati, Inc., and at Microsoft Corporation)
- Authors
- Tantek Çelik (affiliations above)
- Brian Suda (http://suda.co.uk/)
- Ben Ward (http://benward.me/)
- Acknowledgments
- See acknowledgments.
copyright and patents statements apply.
Status
hCard is a microformats.org specification.
Available languages
The English version of this specification is the only normative version. For translations of this document see the #translations section.
Feedback, Errata and Updates
- Public discussion on hCard takes place on hcard-feedback, the #microformats irc channel on irc.freenode.net, and microformats-discuss mailing list.
- Known errors and issues in this specification are corrected on resolved issues and closed issues pages.
- New issues must be documented on issues.
Introduction and Purpose
Across the web—on blogs, newspapers, and discussion forums—people identify themselves by name, discuss friends, family and colleagues, and reference businesses and places. By adding structured mark-up to their web pages, these writers and publishers can refer to people, organizations and places in such a way that software (spiders, aggregators and web browsers) can extract this information, transform it, or expose it to users in useful ways.
This specification introduces the hCard format, a 1:1 representation of the properties and values of the vCard standard (RFC2426), in semantic HTML. hCard enables applications to retrieve information directly from web pages, without referencing a separate file.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Format
In General
The vCard standard (RFC2426) forms the basis of hCard.
hCard uses vCard object, property and value names in lowercase as class names, and maps the nesting of vCard objects to nested HTML elements.
Root Class Name
The root class name for an hCard is vcard
. An element with a class name vcard
is the root node of an hCard object.
Properties and Sub-properties
The properties of an hCard are represented by elements inside the hCard, mapped to the vocabulary using the class
attribute. The content of the an element with a class name of an hCard property, represents the value of that property. Some properties have sub-properties; sub-properties are represented by elements nested within a parent property element.
The hCard Vocabulary
Required fields are noted as such, but note that some required properties can be implied by special optimization patterns (see below.)
fn
- Required
- The formatted-name of the hCard object.
n1
- Required
- A person's name
- Sub-properties of
n
family-name
given-name
additional-name
honorific-prefix
honorific-suffix
- Sub-properties of
adr
- A postal address
- Sub-properties of
adr
post-office-box
extended-address
street-address
locality
region
postal-code
country-name
type
label
- A unstructured form of an address, as it would be presented on an address label. You can also use
label
to mark up entire addresses in situations where you do not have structured address data available.
- Sub-properties of
agent
- Another person (nested hCard) authorized to represent this first hCard. For instance, a secretary or PR contact.
bday
- The birth date of the the entity represented by this hCard
category
- Arbitrary keywords that may group this hCard with others. See also: tagging.
class
- WHAT IS THIS?
email
- An email address
- An hCard may contain multiple
email
properties.- Sub-properties of
email
type
value
- Required.
- Where no sub-properties are specified for
email
,value
is implied.
- Sub-properties of
- geo
- Decimal geographic co-ordinates representing the current location of the entity represented by the hCard.
- Sub-properties of
geo
latitude
longitude
- See also: Geo microformat
key
logo
- A logo graphic associated with this entity. e.g. the logo graphic of a business, or an avatar associated with a discussion-board user.
mailer
nickname
note
org
- The name and unit of the organisation for this hCard.
- If no sub-properties are specified,
organization-name
is implied.
- Sub-properties of
org
organization-name
organization-unit
photo
- A photograph of the entity represented by this hCard.
rev
- The date (and optionally time) in ISO format that the hCard was last revised.
role
- The occupational role of the person represented by this hCard.
sort-string
sound
tel2
-
- Sub-properties of
tel
type
value
title
- The job-title of the person represented by this hCard
tz
- The time-zone the person represented by this hCard is currently located in.
uid
- A unique identifier associated with this entity
url
- A URL associated with this entity.
- There may be multiple URL properties on an hCard object.
Property Notes
1. ^: The 'n' property is OPTIONAL if any implied 'n' optimization rules are in effect.
2. ^: tel - Authors MAY follow the E.123 standard for writing values of telephone numbers. Letter values (e.g. +1-555-FORMATS) MUST be converted to numbers. Use an abbr
to display letters and provide a numerical value simultaneously, e.g. <abbr title="+15553676287">+1-555-FORMATS</abbr>
.
Singular vs. Plural Properties
Singular properties: 'fn', 'n', 'bday', 'tz', 'geo', 'sort-string', 'uid', 'class', 'rev'. For properties which are singular, the first descendant element with that class SHOULD take effect, any others being ignored.
All other properties MAY be plural. Each class instance of such properties creates a new instance of that property.
Human vs. Machine readable
The human visible text contents of an element for a property represents the value of that property, with a few exceptions:
If an <abbr>
element is used for a property, then the 'title
' attribute (if present) of the <abbr>
element is the value of the property, instead of the contents of the element, which instead provide a more human presentable version of the value.
If an <a>
element is used for one or more properties, it MUST be treated as follows:
- For the 'photo' property and any other property that takes a URL as its value, the
href="..."
attribute provides the property value.
- For other properties, the element's content is the value of the property.
If an <img>
element is used for one or more properties, it MUST be treated as follows:
- For the 'photo' property and any other property that takes a URL as its value, the
src="..."
attribute provides the property value.
- For other properties, the
<img>
element's 'alt
' attribute is the value of the property.
If an <object>
element is used for one or more properties, it MUST be treated as follows:
- For the 'photo' property and any other property that takes a URL as its value, the
data="..."
attribute provides the property value.
- For other properties, the element's content is the value of the property.
Value excerpting
Sometimes only part of an element which is the equivalent for a property is used for the value of the property. This typically occurs when a property has a subtype, like 'tel'. For this purpose, the special class name "value
" is used to excerpt out the subset of the element that is the value of the property. E.g. here is an hCard fragment for marking up a home phone number:
vCard:
TEL;TYPE=HOME:+1.415.555.1212
hCard:
<span class="tel">
<span class="type">home</span>:
<span class="value">+1.415.555.1212</span>
</span>
This hCard fragment could be displayed as:
home:
+1.415.555.1212
Property Exceptions
vCard has several properties which either do not make sense on, or are already implied within the context of a web page. This section explains what to (not) do with them.
- vCard's NAME, PROFILE, SOURCE, PRODID, VERSION properties are defined in Sections 2.1.2, 2.1.3, 2.1.4, 3.6.3, 3.6.9 of RFC2426. Content publishers MUST NOT use these properties in their hCards, and as such, hCard consumers/parsers MUST IGNORE these properties if they are found within an hCard. Instead. hCard to vCard converters SHOULD use the title of the page where the hCard is found (e.g. the
<title>
element in HTML documents) to construct the NAME property, MAY output a PROFILE value of "VCARD
" per RFC2426, SHOULD use the URL of the page where the hCard is found to construct the SOURCE property (e.g. perhaps as a parameter to a URL/service that converts hCards to vCards), for an output vCard stream (e.g. a .vcf file). Only services/applications that output actual vCards should write the PRODID property, with the product identifier for said service/application. Similarly, only such services/applications should write the VERSION property, with the value "3.0" (without quotes) per RFC2426 Section 3.6.9.
Organization Contact Info
If the "FN" and "ORG" (organization) properties have the exact same value (typically because they are set on the same element, e.g. class="fn org"), then the hCard represents contact information for a company, organization or place and SHOULD be treated as such. In this case the author also MUST NOT set the "N" property, or set it (and any sub-properties) explicitly to the empty string "". Thus parsers SHOULD handle the missing "N" property, in this case by implying empty values for all the "N" sub-properties.
Implied "n" Optimization
Although vCard requires that the "N" property be present, the authors of the vCard specification (RFC2426) themselves do not include "N" properties in their vCards near the end of the spec (p.38). This apparent contradiction can be resolved by simply allowing the "FN" property to imply "N" property values in typical cases provided in the spec. We do so explicitly in hCard.
If "FN" and "ORG" are not the same (see previous section), and the value of the "FN" property is exactly two words (separated by whitespace), and there is no explicit "N" property, then the "N" property is inferred from the "FN" property. For "FN"s with either one word see below, and for three or more, the author MUST explicitly markup the "N", except for the organization contact info case, see above for that.
- The content of "FN" is broken into two "words" separated by whitespace.
- The first word of the "FN" is interpreted as the "given-name" for the "N" property.
- The second/last word of the "FN" is interpreted as the "family-name" for the "N" property.
- Exception: If the first word ends in a "," comma OR if the second word is a single character (optionally followed by a period "."), then the first word (minus the comma at the end if any) is interpreted as the "family-name" and the second word is interpreted as the "given-name".
This allows simplification in the typical case of people stating:
- given-name (space) family-name
- family-name (comma) given-name
- family-name (comma) given-name-first-initial
- family-name (space) given-name-first-initial (optional period)
Implied "nickname" Optimization
Due to the prevalence of the use of nicknames/handles/usernames in actual content published on the Web (e.g. authors of reviews), hCard also has an implied "nickname" optimization to handle this.
Similar to the implied "n" optimization, if "FN" and "ORG" are not the same, and the value of the "FN" property is exactly one word, and there is no explicit "N" property, then:
- The content of the "FN" MUST be treated as a "nickname" property value.
- Parsers SHOULD handle the missing "N" property by implying empty values for all the "N" sub-properties.
Though parsers MUST follow the implied nickname optimization, publishers SHOULD explicitly indicate the "nickname" even in this case, e.g.:
<span class="vcard">
<span class="fn nickname">daveman692</span>
</span>
The hCard MAY have additional explicit "nickname" property values in addition to the implied nickname.
Implied "organization-name" Optimization
The "ORG" property has two subproperties, organization-name and organization-unit. Very often authors only publish the organization-name. Thus if an "ORG" property has no "organization-name" inside it, then its entire contents MUST be treated as the "organization-name".
Tags as Categories
Categories in hCard MAY be represented by tags with rel-tag. When a category property is a rel-tag, the tag (as defined by rel-tag) is used for that category.
type subproperty values
The 'type' subproperty in particular takes different values depending on which property it is a subproperty of. These 'type' subproperty values are case-INSENSITIVE, meaning "Home" is the same as "home", as well as multivalued, e.g. a tel can be home and preferred:
vCard:
TEL;TYPE=HOME,PREF:+1.415.555.1212
hCard:
<span class="tel"><span class="type">Home</span> (<span class="type">pref</span>erred):
<span class="value">+1.415.555.1212</span>
</span>
This could be displayed as:
Home (preferred):
+1.415.555.1212
type with unspecified value
When the type of a property is specified, and there is no explicit value specified, then everything in the property except for the type is considered the value of the property. E.g.
<span class="tel"><span class="type">Home</span> +1.415.555.1212</span>
is equivalent to:
<span class="tel"><span class="type">Home</span><span class="value"> +1.415.555.1212</span></span>
And thus the type is "home" and the value is "+1.415.555.1212".
adr tel email types
The following lists are informative. See RFC2426 sections 3.2.1 ADR, 3.3.1 TEL, and 3.3.2 EMAIL respectively for normative type values. They are repeated here for convenience. Default type subproperty value(s) is(are) first in each list and indicated in ALL CAPS. types may be multivalued.
- adr type: INTL, POSTAL, PARCEL, WORK, dom, home, pref
- tel type: VOICE, home, msg, work, pref, fax, cell, video, pager, bbs, modem, car, isdn, pcs
- email type: INTERNET, x400, pref
Profile
The hCard XMDP profile is at http://microformats.org/profile/hcard
Content that uses hCard SHOULD reference this profile, e.g.
<head profile="http://microformats.org/profile/hcard">
or
<link rel="profile" href="http://microformats.org/profile/hcard">
or
This content uses <a rel="profile" href="http://microformats.org/profile/hcard">hCard</a>.
Content may combine the above methods as well.
Parsing Details
See hCard parsing.
Examples
This section is informative.
Sample vCard
Here is a sample vCard:
BEGIN:VCARD
VERSION:3.0
N:Çelik;Tantek
FN:Tantek Çelik
URL:http://tantek.com/
END:VCARD
and an equivalent in hCard with various elements optimized appropriately. See hCard Example 1 for the derivation.
<div class="vcard">
<a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
</div>
This hCard might be displayed as:
Note: The version information is unnecessary in hCard markup directly since the version will be defined by the profile of hCard that is used/referred to in the 'profile' attribute of the <head> element.
Live example
Here is Commercenet's contact details, as a live hCard which will be detected, on this page, by microformat parsing tools:
CommerceNet
http://www.commerce.net/
Work:
169 University Avenue
Palo Alto, CA 94301
USA
Work +1-650-289-4040
Fax +1-650-289-4041
Email info@commerce.net
The mark-up, emboldening omitted for clarity, with the following semantic improvements:
abbr
to expand abbreviations
- hyperlinking the org name with the url
<div class="vcard">
<a class="fn org url" href="http://www.commerce.net/">CommerceNet</a>
<div class="adr">
<span class="type">Work</span>:
<div class="street-address">169 University Avenue</div>
<span class="locality">Palo Alto</span>,
<abbr class="region" title="California">CA</abbr>
<span class="postal-code">94301</span>
<div class="country-name">USA</div>
</div>
<div class="tel">
<span class="type">Work</span> +1-650-289-4040
</div>
<div class="tel">
<span class="type">Fax</span> +1-650-289-4041
</div>
<div>Email:
<span class="email">info@commerce.net</span>
</div>
</div>
More Examples
See hCard examples for more examples, including all examples from vCard RFC2426 converted into hCard.
Examples in the wild
This section is informative. The number of hCard examples in the wild has expanded far beyond the capacity of being kept inline in this specification. They have been moved to a separate page.
Implementations
This section is informative. The number of hCard implementations has also expanded beyond the capacity of keeping them inline. They have been moved to a separate page.
Articles
This section is informative. For further reading on hCard see hcard-articles.
Buttons
You can use these buttons on pages with hCards. See buttons#hCard for any recent additions.
- (mirror: )
- CSS-powered button, as evidenced at microformat badges @ re-run
Copyright
Per the public domain release on the authors' user pages (Tantek Çelik, Brian Suda) this specification is released into the public domain.
Public Domain Contribution Requirement. Since the author(s) released this work into the public domain, in order to maintain this work's public domain status, all contributors to this page agree to release their contributions to this page to the public domain as well. Contributors may indicate their agreement by adding the public domain release template to their user page per the Voluntary Public Domain Declarations instructions. Unreleased contributions may be reverted/removed.
Patents
This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.
References
Normative References
- XHTML 1.0 SE
- vCard RFC2426
- ITU recommendation E.123 format of telephone numbers (chargeable document)
- RFC 2119
Informative References
This section is informative.
- hCard history
- X.520 in Postscript (HTMLization courtesy of Google Cache) - vCard refers to ROLE as being "based on the X.520 Business Category explanatory attribute".
- HTML reformatted version of RFC2426
- CSS1
- XHTML 1.1
- Wikipedia summary of ITU-T Recommendation E.123 - for "TEL" values.
- Internet Mail Consortium Personal Data Interchange vCard and vCalendar
- ISO8601
Specifications That Use hCard
Similar Work
This section is informative.
Inspiration and Acknowledgments
This section is informative.
Thanks to: my good friend Vadim who introduced me to vCard many years ago, and if I'd only paid more attention then, perhaps I could have helped a lot of people avoid wasting a lot of time reinventing various standards wheels.
Notes on derivation from vCard
This section is informative.
See: hcard-design-methodology.
More Semantic Equivalents
For some properties there are HTML elements which better match and convey their semantics. The following properties SHOULD be encoded with the following HTML:
URL
in vCard becomes <a class="url" href="...">...</a>
inside the element with class="vcard"
in hCard.
- Similarly,
EMAIL
in vCard becomes <a class="email" href="mailto:...">...</a>
PHOTO
in vCard becomes <img class="photo" src="..." alt="Photo of ..." />
or <object class="photo" data="..." type="...">Photo of ...</object>
UID
in vCard simply becomes another semantic applied to a specific URL (or EMAIL) for an hCard.
Singular and Plural derivations
The lists of singular and plural properties have been derived by analyzing the semantics of the individual properties in vCard RFC2426 and determining logically that they MUST be singular per their semantics. See hcard-singular-properties for explanations.
Plural Properties Singularized
Since plural property names become their singular equivalents, even if the original plural property permitted only a single value with multiple components, those multiple components are represented each with their own singularly named property and the the property is effectively multivalued and subject to the above treatment of multivalued properties.
Related Pages
- hCard
- hCard cheatsheet - hCard properties
- hCard creator (feedback) - create your own hCard.
- hCard authoring - learn how to add hCard markup to your existing contact info.
- hCard examples - example usage of various classes within hCard.
- hCard examples in the wild - an on-going list of websites which use hCards.
- hcard-supporting-user-profiles - sites with user profiles marked up with hCard - a very common example.
- hCard FAQ - if you have any questions about hCard, check here.
- hCard implementations - websites or tools which either generate or parse hCards.
- hCard parsing - normative details of how to parse hCards.
- hCards and pages - semantic distinctions between different hCards on a page, and how to identify each
- hcard-user-interface - techniques and issues surrounding user-interfaces to author, publish, and display hCards.
- hCard profile - the XMDP profile for hCard
- hCard singular properties - an explanation of the list of singular properties in hCard.
- hCard tests - a wiki page with actual embedded hCards to try parsing.
- hCard advocacy - encourage others to use hCard
- hCard "to do" - jobs to do
The hCard specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. These thoughts, issues, and questions are kept in separate pages.
- hCard brainstorming - brainstorms and other explorations relating to hCard.
- hcard-parsing-brainstorming - brainstorming specific to parsing of hCard
- geo brainstorming
- hCard feedback - general feedback (as opposed to specific issues).
- hCard issues - specific issues with the specification.
- vCard errata - corrections to the vCard specification, which underlies hCard.
- vCard suggestions - suggested improvements to the vCard specification.
Translations
Read the hCard specification in additional languages: