hcard-implied-examples

From Microformats Wiki
Revision as of 22:57, 19 December 2008 by MongeTrelz (talk | contribs) (aceltr)
Jump to navigation Jump to search

cololi

Implied hCard examples

Example implied hCards, see hcard-implied for a description and hcard-implied-brainstorming for ideas.

Authors

Instructive Examples

References to a person within a blog post

Blog writers specifically, but other writers on the Web as well frequently link to an individual's homepage by linking that persona's name. One example from Quirksblog:

<p>Just as last year, <a href="http://allinthehead.com" class="external">Drew McLellan</a>
has created his web geek advent calendar 24ways, in which a few web developers of note share
some tips and tricks to impress your friends. Today my contribution:
<a href="http://24ways.org/2006/hide-and-seek-in-the-head" class="external">Hide and Seek
in the Head</a>.</p>

Displaying as:

Just as last year, Drew McLellan has created his web geek advent calendar 24ways ...

Changing "Drew McLellan" to an hCard would currently require the at least following additional markup:

<p>Just as last year,
  <span class="vcard">
    <a href="http://allinthehead.com" class="external fn url">Drew McLellan</a>
  </span>
has created his web geek advent calendar 24ways...
</p>

If not:

<p>Just as last year,
  <span class="vcard">
    <a href="http://allinthehead.com" class="external fn n url">
      <span class="given-name">Drew</span>
      <span class="family-name">
        <span class="sort-string">M</span>cLellan
      </span>
    </a>
  </span>
has created his web geek advent calendar 24ways...
</p>

an implied hCard would simplify this construct into a single element with a pre-defined class name.

Simple hCards nested in other Microformats

Citation

Brian Suda marked up his citation as

<p class="author vcard"><a class="fn url" href="http://suda.co.uk/" rel="me">Brian Suda</a></p>

Which could be shortened into a single element and two class names, and not require knowledge of Citation and hCard.

hReview

Many reviewers use a construct similar to David Orchard:

Reviews ... are by David Orchard

Or the following invalid construct (from Joan, listed on the hReview Examples in the wild:

<span class="reviewer fn"><A HREF="http://jg.typepad.com/ciel">Joan Gelfand</A></span>

An implied hCard would simplify the markup and prevent (some) user error.

hAtom

The Strangelove Wordpress (zip) theme creates the following construct for authors:

<span class="vcard author"><a class="url fn" href="http://www.example.com/author">Nickname</a></span>

While the Sandbox theme creates:

<span class="entry-author author vcard">By
<a class="url fn" href="http://www.example.com/author" title="View all posts by Nickname">Nickname</a>
</span>

Implied hCards would simplify hAtom implementations for developers.