From IndieWeb
Jump to: navigation, search

h-card is the microformats2 vocabulary for marking up people, organizations, and venues on web sites.



Each IndieWeb site should have an h-card on the homepage, preferably containing at least name, url and photo (or logo) properties — just these three cover most h-card usage on the IndieWeb, for example, putting a name and face to comments or URLs.

Having a minimal h-card on your index page allows Gravatar-like lookups based on Why_web_sign-in#Why_not_emaildomain instead of email address.

Telegraph uses your home page h-card to grab your profile icon and name after you log in.[1]


You can make a simple h-card that does the above with two elements and one classname, for example:

<a class="h-card" href="http://waterpigs.co.uk">
<img src="/photo.png" alt="" /> Barnaby Walters</a>


You can check your homepage h-card for completeness and common mistakes using these validators:


From a pure user features perspective, and assuming no invisible metadata, how are the following accomplished (that is, with h-card)?

  • I'd like to show some personal profile information (for example, name) on my posts, but not my picture. I may want to show additional profile information on another page, for example. /about. That may include my picture, or it may not (including icon).
  • When I comment, like, repost, or rsvp to someone else's post, and they render that response (comments-presentation), I'd like to let them show my additional profile information, including my picture, if they choose. authorship handles some of this, but maybe not all, for example, the case where I don't show my picture anywhere on my site.
  • Similarly, when I log into a site like this wiki with IndieAuth (etc.), I'd like the site to be able to discover my additional profile information, including my picture, to show on my profile page, activity, or other appropriate places. representative-hcard-parsing gets close, but not all the way. #Brainstorming below is a straw man extension that could help.

From an h-card specific viewpoint, here are some additional issues / questions:

  • Along the same lines, some people (e.g. User:Snarfed.org, User:Mowens.com, gRegor Morrill) would like to make some parts of their h-card invisible everywhere, but still available to programmatic consumers. Examples include rel-me links to some silos, public encryption key. Related: antipatterns#invisible_metadata
    • On my site currently, my author hCard on each post is invisible because I do not feel the need to display my photo, URL, and name on every post. This would be different if it was a multiple-author site. gRegor Morrill
    • I too have made the h-card invisible on my home page because I don't want details to show there for design reasons. Jeremy Cherfas


One possible solution for the partial plus complete h-card issue is to include a rel-me link to the full h-card and *not* mark up the partial profile information on the home page as an h-card. The representative-hcard-parsing algorithm would then follow the rel-me link and use its full data. It doesn't seem ideal, but it'd work.

One problem with this is that the home page usually has many rel-me links, for example, to silos, and we don't yet have a way to denote the "canonical" one. gRegor Morrill, User:Mowens.com, and others have proposed using u-uid and/or a new rel-canonical property for this.

See Also

Retrieved from "https://indieweb.org/h-card"
Personal tools
Recent & Upcoming