From Microformats Wiki
Revision as of 01:13, 14 August 2005 by Tantek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

hCard examples

Example hCards.


RFC 2426 examples in hCard

  • In the process of creating 1:1 hCard examples for each example in RFC 2426.

2.4.2 VCARD

AGENT:BEGIN:VCARD\nFN:Joe Friday\nTEL:+1-919-555-7878\n
TITLE:Area Administrator\, Assistant\n EMAIL\;TYPE=INTERNET:\n

in hCard could literally be (with the unnecessary type=internet default omitted):

<div class="agent">
 <div class="vcard">
  <a class="email" href="mailto:jfriday@host.com">
   <span class="fn">Joe Friday</span>
  <div class="tel">+1-919-555-7878</div>
  <div class="title">Area Administrator, Assistant</div>

The outer agent & vcard spans can be easily collapsed, and email and fn can also be collapsed to use a single element as such:

ISSUE: Should we bother with showing simplification steps for the RFC 2426 examples in hCard? Or just show the simplified end result? And optionally show the derivation(s) on a separate page?

<div class="agent vcard">
 <a class="email fn" href="mailto:jfriday@host.com">Joe Friday</a>
 <div class="tel">+1-919-555-7878</div>
 <div class="title">Area Administrator, Assistant</div>

this hCard could be displayed as:

Joe Friday +1-919-555-7878 Area Administrator, Assistant

3.1.1 FN Type Definition

FN:Mr. John Q. Public\, Esq.

this vCard fragment as an hCard fragment:

<span class="fn">Mr. John Q. Public, Esq.</span>