[uf-discuss] Microformats versus Microdata

Stephen Paul Weber singpolyma at singpolyma.net
Sat Jun 9 15:13:43 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Somebody claiming to be Micky Hulse wrote:
>On Sat, Jun 9, 2012 at 11:23 AM, Stephen Paul Weber
><singpolyma at singpolyma.net> wrote:
>> Somebody claiming to be Micky Hulse wrote:
>I should have clarified... I don't mind that microformats use CSS
>classes

Sorry, just going to point out again (pet peeve of mine), there are no "CSS 
classes", only "HTML classes". :P

>I just think my HTML looks a tad more readable when using
>microdata. For example:
>
><https://gist.github.com/2898578>
>
>(Sorry that the HTML is different)

Maybe.  That will be a matter of personal taste.  Those examples look 
basically the same to me, except that the microdata-based on uses a URI for 
a part of its vocabulary.

>Maybe that's not the best example, but my gut feeling is that I prefer
>the microdata because it's not using the class attributes. Of course,
>my opinion is based on personal preference. For example:
>
><div class="sig vcard">
>
>vs.
>
><div class="sig" itemscope itemtype="http://schema.org/Person">
>
>Clearly the microdata is more markup, but I like that the "data
>format" has bee separated from the class attribute.

The class attribute is itself a "data format", encoding types that the 
element matches.  The fact that people happen to style classes with CSS is 
sort of irrelevant: if I used microdata I would style microdata attributes 
using CSS as well.

>Going back to the microdata FAQ:
>
>"...reuse of the class tag can cause conflicts with website CSS."
>
>I think they make a good point there.

Only if you somehow (a) can't change your CSS and (b) never style with 
anything other than classes.  Like I said above: I would use CSS on 
itemprop/itemtype as well, in which case their use affects my styles as 
well.

>(I even bought the
>Microformat book when it first came out)

There's a book?  That's weird...

>On the other hand, who's to say one can't use both? Right?

Sure, you can definitely use both.

So, in the end it's your own choice, I'll just outline breifly why I prefer 
microformats:

* Re-using existing HTML semantics (class, <a>, <img>, rel, etc) instead of 
   inventing something new.
* Community consensus on vocabularies based on previously-established 
   formats (vCard, ATOM, etc).  Not that microdata couldn't use good 
vocabularies, since it's just a syntax, but currently the popular 
vocabularies come out of WHATWG/Google and not the community.
* Long-standing standards with existing widely-deployed implementations

YMMV

- -- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJP08qWAAoJENEcKRHOUZzewq4QAMbmrWqSBDBLvWBnSqUDRrZe
IOzLyso/UUWv+E85C8heuV4HOnZY78ngIv/S97qtpeMOl3E3IhpeQSzQYfcBDOXm
vb/+EBVMdJbnE0T1LdRfwuFpJulOKwwvjUwgUg20ShuAeBeuz1oO3B8D8zenFv/v
PTCD7tmp6/OE1OJ7S3W58ho4fUm4Q6oOnY3aj53eX1/eSsVuX+BcGkvdUqk5Vt9z
ssGJY3ioH5v0be91IEdo0lItBiqlqahiaE4xSIekZnfhil9mOIcGxMhi+NBO2e7s
cLUXy5C66AhL2SmCSUJARliheXSvh3Vfp9S4xpe8Q/g4RfRbluaSNel6iI9euFZi
n04vMkJPDGM2uVedv/9am2VM2ewXr0L9zk+Sl5jaxN3Bmd0KaR/Gsti5VdNjPQL8
KihUlBTEI0moj7BDBPOGosDxQayy0gnuGfeSngLOrknXXqh5GN6PpEE0KN6uw2JE
TnlYVDL1VVP9iILCYxCCJTa8FgoAPphILB2OBgtfpa+cBlSSQv4FHsO8YHM+qcMp
MBIZouN/V5aUbThuxSiejRDpYSHhDeAjGhK4vEuy9LXj5dDVOhnju1qXvvnbvdDo
wx0QeSgV04tRtPh5Vzo1wjAQJ2h7eMnlLyJyDK6whJ4EmmsSwu4RfZ+pgrC6TfZ0
4omnmmsS5Zar5I8A45qs
=+3ds
-----END PGP SIGNATURE-----


More information about the microformats-discuss mailing list