Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

They both serve the same purpose: Providing a vocabulary for semantic markup. Schema is recognized and standardized… but the microformats standard is by an open community process.

Schema exploits microdata in documentation, while microformats go on classes. (Of note: microdata means that an element must be of a single itemtype, while microformats allow several classes to apply to the same element. I can markup xFolk+hAtom with classes, but not with microdata.)

Is this a black-and-white situation? Google says I can't use both "because it may confuse the parser".

What's the consensus on these?

share|improve this question
    
All things being equal, my preference is to align myself with Google guidelines. The guidelines are moving targets but (as of this writing) this help section from google seems to suggest a Google preference for Schema.org: support.google.com/webmasters/answer/1211158#whymicrodata –  User Feb 10 at 7:48

3 Answers 3

up vote 12 down vote accepted

schema.org is only a collection of vocabularies (primarily, but not exclusively, for use with microdata), so this question should be: microdata vs. microformats. And why not invite RDFa to the party?

RDFa and microdata are not the same, but similar. microformats however differs from both strongly.

If your only aim would be to enhance the display of search results from search engines, it doesn't matter which markup way you choose (as long as it is supported). But "semantic markup", of course, allows much more: building the Semantic Web. Not without reason microformats relates to the term "lower-case semantic web", while RDFa relates to "upper-case Semantic Web" (microdata is much newer, but it would fit into the upper-case variant). The main difference: extensibility. RDFa and microdata use URIs, microformats uses pre-defined class names. With microformats you can only mark-up certain content, if the community created and accepted an appropriate "vocabulary". With RDFa and microdata you can create your own vocabulary, if there doesn't already exist an appropriate one.

In other words: RDFa and microdata define a way to semantically mark-up content, but they don't supply vocabularies. microformats defines a way to semantically mark-up content and (solely) supplies vocabularies.


Google says I can't use both "because it may confuse the parser".

I wouldn't let this stop me from implementing several markup ways. Also, Google kind of revoked this statement in a chat.


See also the questions:

share|improve this answer
    
My answer to a different question might be relevant/interesting, too: stackoverflow.com/a/12869163/1591669 –  unor Oct 23 '12 at 18:10

Google's structured data tester shows how well its parsers recognize both their presence together. Schema.org documentation is biased to microdata- invented within Google by WHATWG HTML5 editor. It prefixes RDFa lite reseved words with "item", eg. property=itemprop and so forth. Also it is unsupported outside HTML5.

RDFa initial context http://www.w3.org/2011/rdfa-context/rdfa-1.1 allows schema: prefix, so rest assured as RDFa despite lacking any bias favoring schema treats it as well as any vocab for semantic web.

vocabs address semantic aspects from domains outside W3's jurisdiction. The initial context illustrates this by recognizing cc and license for legal matters, og for social networks, and so forth. Search is more cross-cutting concern than aspect specific to domain, so aspects covered by schema vocab range from webPagElement to geographic maps and taxIDs. Its sameas giving dictionary meaning to machine for every word targeted to human user. Despite consensus on the vocab aspects by major search players, commitment on how which of such structured data will be pushed to user querys' results is absent. So far only ratings are seen on Google results and they are mostly misleading.

Microformats solve indivisible recurring use-cases. For larger use-cases RDFa works on both HTML5 and non-HTML5 pages. And if XHTML is used the same semantic content can be transformed through xslt or grddl or so on.

share|improve this answer

There is no consensus on these.

Both can be used for Google, though Schema.org is the newer of the two and appears to be more comprehensive in my opinion.

It boils down to your needs for markup - use what is easier and more suitable to what you are doing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.