Wikipedia:WikiProject Microformats/hcard
From Wikipedia, the free encyclopedia
Contents |
[edit] hCard
hCard is a microformat for contact details of people (who could be in either articles or user profiles), companies, organizations, and places.
This page considers how it might be deployed on Wikipedia.
There are moves to extend hCard to include date-of-death, which will be useful for biography pages, and to add a "gender" property, which will aid genealogists.
hCard allows for data to be entered into address books, or used as Geo (see Wikipedia:WikiProject Microformats#Geo) is. Geo is a subset of hCard.
[edit] Potential
- Category:People infobox templates e.g.
- Template:Infobox_Biography
- Template:Infobox_actor which should result in actor pages, e.g. Humphrey Bogart's page, being properly hCarded.
- Category:Geography infobox templates
- Template:Infobox_Newspaper
- Attempted, but breaks where "name" is an image. Andy Mabbett 12:57, 22 March 2007 (UTC)
- Addressable buildings e.g. The_Old_Crown, Birmingham
- Tourist attractions, e.g. Cadbury World
- Companies, e.g. Tesco (note headquarters address in infobox)
- Motorway service stations, e.g. Watford Gap service station
- Railway Stations, e.g. Perry Barr railway station
- etc.
See also Wikipedia:Persondata and this comparison of persondata and hCard
[edit] Sample mark-up
For sample hCard mark-up, please see hCard or pages linked from the hCard spec on microformats.org.
[edit] Relevant Templates
- {{Hcard-bday}} - inline fn and bday, for a living or dead person.
- {{Hcard-geo}} - inline fn-org and coordinates, for a building, organisation or venue.
- {{PoI}} (and related) - table rows as hCards, with Geo.
- {{PoIgb}} - GB version, with OS Grid Refs.
[edit] Birth date and age
- {{Birth date and age}} and {{Birth date}}, for example, {{birth date and age|1926|5|8}}, output the "bday" property in the form, effectively:
- <td>8 May 1926 (age 80)<br style="display:none;" /><span style="display:none;" class="bday">(1926-05-08)</span></td>
- {{Hcard-bday}} and {{Hcard-bday-place}} wrap the above in an hCard with a name inside a <span class="fn">.
- {{death date and age}}, such as {{death date and age|1974|11|25|1948|6|19}}
- To be modified as above, pending addition of death date field to hCard
[edit] Sample mark-up
For a two column table, showing name and coordinates, with one hCard on each row:
|- class="vcard" |class="fn org"|Blackroot Pool |{{coord|52.5726|-1.8428}}
[edit] hCard examples on Wikipedia
See: Category:Templates generating hCards
Examples:
- HCard#Live example
- St George's Minster, Doncaster
- Lists of coordinates using Geo in hCard:
- Manchester Ship Canal
- Netherton Tunnel Branch Canal
- Volcanoes in the USA - 252 examples!
[edit] In templates
[edit] Infoboxes for people
Will display "bday" if {{Birth date}} or {{Birth date and age}} is used.
[edit] Infoboxes for places
- {{Infobox Bridge}}
- {{Infobox City}}
- {{Infobox lake}}
- {{Infobox UK station}}
[edit] Pages needing hCard
These pages need the manual addition of hCard; or perhaps conversion to tables, with hCard included:
- List of tallest structures in the United States
- Alexandria (disambiguation) (note commented-out red-links)
- Kermadec Islands
For tables needing hCard, see Category:Lists of coordinates.