http://microformats.org/wiki/hcard
hCard格式用于在html中标记人、公司、组织的信息,如name,address等
hCard基于vCard, 通过在html标签中添加符合规则的class属性来达到标记信息的目的。
- vcard 作为根类名,表明hCard信息所在
- fn 必须元素,标记name
- n 标记structured name用于以下元素的容器
- honorific-prefix: 如:Ms, Mr, Dr
- given-name: given name
- additional-name: other/middle name
- family-name: family name
- honorific-suffix: eg。 phd esq
- nickname nickname/alias
- org -company/organization
- photo -photo, icon, avatar
- url -homepage for this contact
- email -email address
- tel -telephone number
- adr -structured address
- category -for tagging contacts
- note -notes about the contact
等
1 <div class="vcard"> 2 <span class="fn">Sally Ride</span> 3 (<span class="n"> 4 <span class="honorific-prefix">Dr.</span> 5 <span class="given-name">Sally</span> 6 <abbr class="additional-name">K.</abbr> 7 <span class="family-name">Ride</span> 8 <span class="honorific-suffix">Ph.D.</span></span>), 9 <span class="nickname">sallykride</span> (IRC) 10 <div class="org">Sally Ride Science</div> 11 <img class="photo" src="http://example.com/sk.jpg"/> 12 <a class="url" href="http://sally.example.com">w</a>, 13 <a class="email" href="mailto:sally@example.com">e</a> 14 <div class="tel">+1.818.555.1212</div> 15 <div class="adr"> 16 <div class="street-address">123 Main st.</div> 17 <span class="locality">Los Angeles</span>, 18 <abbr class="region" title="California">CA</abbr>, 19 <span class="postal-code">91316</span> 20 <div class="country-name">U.S.A</div></div> 21 <time class="bday">1951-05-26</time> birthday 22 <div class="category">physicist</div> 23 <div class="note">1st American woman in space.</div> 24 </div>