hCard Microformat (part 2)

Roger Costello

Click arrow key () to navigate to next page

Second Example using n

  1. <cite>Dr. John Philip Paul Stevenson, Jr., M.D., A.C.P.<cite>
  1. <cite class="fn n">
  2. <span class="honorific-prefix">Dr.</span>
  3. <span class="given-name">John</span>
  4. <span class="additional-name">Philip</span>
  5. <span class="additional-name">Paul</span>
  6. <span class="family-name">Stevenson</span>,
  7. <span class="honorific-suffix">Jr.</span>,
  8. <span class="honorific-suffix">M.D.</span>,
  9. <span class="honorific-suffix">A.C.P.</span>
  10. </cite>

Second Example using n

hCard Profile

  1. <html>
  2. <head profile="http://www.w3.org/2006/03/hcard">...</head>
  3. <body>...</body>
  4. </html>

Lab 1

  1. <head>
  2. <title>Stephen Hawking</title>
  3. <meta http-equiv="content-type" content="application/xhtml+xml;charset=UTF-8" />
  4. </head>
  5. <body>
  6. <h1>Stephen Hawking</h1>
  7. <p>Stephen William Hawking, CH, CBE, FRS (born 8 January 1942) is a theoretical physicist.
  8. Hawking is the Lucasian Professor of Mathematics at the University of Cambridge, and a
  9. Fellow of Gonville and Caius College, Cambridge. He is known for his contributions to
  10. the fields of cosmology and quantum gravity, especially in the context of black holes,
  11. and his popular works in which he discusses his own theories and cosmology in general.
  12. These include the runaway popular science bestseller A Brief History of Time, which stayed
  13. on the London Sunday Times bestseller list for a record-breaking 237 weeks.
  14. </p>
  15. </body>

Lab 1 (cont.)

Determining the Value of fn, Case 1

  1. <cite class="fn">Dr. John Q. Smith, M.D.</cite>
  1. Dr. John Q. Smith, M.D.

Determining the Value of fn, Case 2

  1. <p class="fn">
  2. <span class="value">John </span>
  3. is the speaker. Dr.
  4. <span class="value">Smith</span>
  5. will talk on ...
  6. </p>
  1. concatenation('John ', 'Smith') = John Smith

Determining the Value of fn, Case 3

  1. <p class="fn n">
  2. <span class="given-name">John</span>
  3. <span class="family-name">Smith</span>
  4. </p>

Determining the Value of fn, Case 3

  1. '
  2. John
  3. Smith
  4. '
  1. 'John Smith'

Determining the Value of fn, Case 4

  1. <abbr class="fn" title="John Smith">John</abbr>
  1. John Smith

nickname Property

  1. <cite>Roger (Rocket) Clemens<cite> is the pitcher for the Houston Astros.
  1. <span class="vcard">
  2. <cite class="fn n">
  3. <span class="given-name">Roger</span>
  4. (<span class="nickname">Rocket</span>)
  5. <span class="family-name">Clemens</span>
  6. </cite>
  7. </span>
  8. is the pitcher for the Houston Astros.

photo Property

  1. <img src="http://www.xfront.com/images/Roger.gif" alt="Photo of Roger Costello" />
  1. <img class="photo" src="http://www.xfront.com/images/Roger.gif" alt="Photo of Roger Costello" />

Alternative to the img Element

  1. <object class="photo" data="http://www.xfront.com/images/Roger.gif">Photo of Roger Costello</object

bday Property

  1. Stephen Hawking's birthday is January 8, 1942.
  1. <span class="vcard">
  2. <span class="fn n">
  3. <span class="given-name">Stephen</span>
  4. <span class="family-name">Hawking</span></span>'s birthday is
  5. <abbr class="bday" title="1942-01-08">January 8, 1942</abbr>
  6. </span>

abbr Element

  1. <abbr class="bday" title="1942-01-08">January 8, 1942</abbr>

Delivery Address Properties

adr Property

adr Property

  1. <p>The home address of John Q. Smith is:<br />
  2. 10 Bolyston St.<br />
  3. Boston, MA 01210
  4. </p>

adr Property

  1. <p>The
  2. <span class="vcard">
  3. <span class="adr">
  4. <span class="type">home</span>
  5. address of
  6. <span class="fn n">
  7. <span class="given-name">John</span>
  8. <abbr class="additional-name" title="Quinlan">Q.</abbr>
  9. <span class="family-name">Smith</span>
  10. </span>
  11. is:<br />
  12. <span class="street-address">10 Bolyston St.</span><br />
  13. <span class="locality">Boston</span>,
  14. <abbr class="region" title="Massachusetts">MA</abbr>
  15. <span class="postal-code">01210</span>
  16. </span>
  17. </span>
  18. </p>

Using Multiple "type" Subproperties

  1. The preferred delivery address is his home address ...
  1. The
  2. <span class="type">pref</span>ferred
  3. delivery address is his
  4. <span class="type">home</span> address ...

Added Information

  1. Address:
  2. 10 Bolyston St.
  3. Boston, MA 01210
  1. <span class="adr">
  2. <abbr class="type" title="pref,home">Address:</addr>
  3. <span class="street-address">10 Bolyston St.</span>
  4. <span class="locality">Boston</span>,
  5. <abbr class="region" title="Massachusetts">MA</abbr>
  6. <span class="postal-code">01210</span>
  7. </span>

type Values

adr Microformat

Continued ...