Question

I have stumbled upon RDFa and have seen the terms microdata and microformats used frequently.

What are they and why might they be useful when developing websites?

Was it helpful?

Solution

Semantics. Nowadays, the main reason is so Google can show Rich Snippets. To see how this works, put your page into http://www.google.com/webmasters/tools/richsnippets and see what it picks up. Try the examples on that page to see what they are using in search results.

Google also have a page called http://schema.org/ that outlines their microdata schema for marking things up.

In my opinion microdata is the way to go, microformats overloaded the class attribute, and though I understand it's within the spec, for me it's no longer the best place to put this info. RDFa is really good, but it's complex and not that obvious to most. Microdata is clear, well defined and backed by Google, hence my recommendation to use that.

On my sites, I've completely replace microformats with microdata, despite being a super early adopter and follower of the whole microformat system.

OTHER TIPS

They are useful for letting search engines and users directly know what the website contents is about without them having to guess.

Using RDFa, users directly see the webpage as usual, while search engines see invisible spans surrounding important terms on the website with their definitions.

The most prominent examples that search engines currently pick up are Yahoo's SearchMonkey picking up some major community defined schemas, and the Google controlled Schema.org (they don't recognise community defined schemas as far as I can tell)

I am much more inclined to encourage the use of RDFa far above and beyond microdata and microformats.

All three have a similar use case - to annotate fragments of HTML in order to give them more meaning to a useragent. E.g addresses, products, events etc, that would be difficult to interpret from syntax alone.

RDFa also has a second use case, compelling for those who are proponents and advocates of Semantic Web. It provides a means by which to publish RDF i.e rich, structured and meaningful data, that can be put in a triplestore, aggregated and queried, rather like a database. As more and more people publish RDF, so the databases gets bigger and the searches become more interesting.

When I see comments such as 'RDFa is more complicated' I often wonder 'For who'. The problem with Microdata and Microformats is that there is no standard way to interpret or parse these formats. So although it may be quick and easy for somebody to publish microdata, it is more difficult for someone to write a parser. Ultimately it becomes to expensive and redundant. RDFa on the other hand does not suffer from this problem and one RDFa parser will work with any web page with RDFa on it regardless of whether it is describing events or products. It always resolves to RDF.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top