Digital Marketing Handbook

(ff) #1

Microformat 18


names (in this case geo, latitude and longitude, all part of the geo microformat specification):


The birds roosted at
<span class="geo">
<span class="latitude">52.48</span>,
<span class="longitude">-1.89</span>
</span>

software agents can recognize exactly what each value represents and can then perform a variety of tasks such as
indexing, locating it on a map and exporting it to a GPS device.

Example


In this example, the contact information is presented as follows:


<ul>
<li>Joe Doe</li>
<li>The Example Company</li>
<li>604-555-1234</li>
<li><a href="http://example.com/">http://example.com/</a></li>
</ul>

With hCard microformat markup, that becomes:


<ul class="vcard">
<li class="fn">Joe Doe</li>
<li class="org">The Example Company</li>
<li class="tel">604-555-1234</li>
<li><a class="url" href="http://example.com/">http://example.com/</a></li>
</ul>

Here, the formatted name (fn), organisation (org), telephone number (tel) and web address (url) have been identified
using specific class names and the whole thing is wrapped in class="vcard", which indicates that the other
classes form an hCard (short for "HTML vCard") and are not merely coincidentally named. Other, optional, hCard
classes also exist. Software, such as browser plug-ins, can now extract the information, and transfer it to other
applications, such as an address book.
Free download pdf