Semantic brevity

When I write here at adactio.com, I often sprinkle in some microformats. As I wrote in Natural Language hCard, I’ve developed a sense of smell for microformats:

Once I started looking for it, I started seeing identity and event information in lots of places… even when it doesn’t explicitly look like cards or calendars.

If I’m linking to somebody using their full formated name, then it’s a no-brainer that I’ll turn that into an hCard:

<span class="vcard">
<a class="fn url" href="http://example.com/">
Joe Bloggs
</a>
</span>

But what if I don’t want want to use the full name? It would sound somewhat stilted if I wrote:

I was chatting with Richard Rutter the other day…

When you work alongside someone every day, it sounds downright weird to always refer to them by their full name. It’s much more natural for me to write:

I was chatting with Richard the other day…

I would still make his name a hyperlink but what can I do about making this text into an hCard? Should I change my writing style and refer to everyone by their full formated name even if the context and writing style would favour just using their first name?

Enter the abbr element:

ABBR: Indicates an abbreviated form

I can write “Richard” in my body text and use the semantics of (X)HTML to indicate that this is the abbreviated form of “Richard Rutter”:

<abbr title="Richard Rutter">
Richard
</abbr>

From there, it’s a simple step to providing an hCard containing the formated name without compromising the flow of my text:

<span class="vcard">
<a class="url" href="http://clagnut.com/">
<abbr class="fn" title="Richard Rutter">
Richard
</abbr>
</a>
</span>

Now a parser will have to do some extra legwork to find the formated name within the title attribute of the abbr element rather than in the text between the opening and closing tags of whatever element has a class of “fn”. But that’s okay. That’s all part of the microformats philosophy:

Designed for humans first and machines second

Specifically, humans who publish first, machines that parse second.

If I were to link off to Richard’s site from here, I’d also combine my microformats: hCard + XFN:

<span class="vcard">
<a class="url" rel="friend met co-worker" href="http://clagnut.com/">
<abbr class="fn" title="Richard Rutter">
Richard
</abbr>
</a>
</span>

Now I’ve got a bounty of semantic richness:

All of that in one word of one clause of one sentence:

I was chatting with Richard the other day…

Have you published a response to this? :

Responses

Matthias Pfefferle

Jeremy beschreibt in seinem Weblog wie man mit Hilfe des abbr Tags eine vollständige hCard für Links erstellen kann.

Sein Problem:

I would still make his name a hyperlink but what can I do about making this text into an hCard? Should I change my writing style and refer to everyone by their full formated name even if the context and writing style would favour just using their first name?

Will man eine hCard erstellen bei der nur der Vorname angezeigt wird, wird natürlich auch nur der Vorname ins Adressbuch übernommen:

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

Die Lösung des Problems ist die Nutzung des abbr Tags:

<span class="vcard"> <a class="url" rel="friend met" href="http://example.com/"> <abbr class="fn" title="Max Mustermann"> Max </abbr> </a>
</span>

Schicke Idee, fragt sich nur ob der Vorname als Abbreviate (Abkürzung) durch geht und die Nutzung von <abbr> gerechtfertigt ist.

Matthias Pfefferle

Jeremy beschreibt in seinem Weblog wie man mit Hilfe des abbr Tags eine vollständige hCard für Links erstellen kann. Sein Problem: I would still make his name a hyperlink but what can I do about making this text into an hCard? Should I change my writing style and refer to everyone by their full formated name even if the context and writing style would favour just using their first name? Will man eine hCard erstellen bei der nur der Vorname angezeigt wird, wird natürlich auch nur der Vorname ins Adressbuch übernommen:

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

Die Lösung des Problems ist die Nutzung des abbr Tags:

<span class="vcard">
 <a class="url" rel="friend met" href="http://example.com/">
 <abbr class="fn" title="Max Mustermann">
 Max
 </abbr>
 </a>
</span>

Schicke Idee, fragt sich nur ob der Vorname als Abbreviate (Abkürzung) durch geht und die Nutzung von <abbr> gerechtfertigt ist.

Previously on this day

23 years ago I wrote The roots of conflict

Here’s some more grist for the fundamentalist mill.

23 years ago I wrote Falwell-Robertson-Bin Laden Quiz

This is too perfect.