htmlsemantic-webmicrodatardfa

Microdata vs RDFa


I have a quick question about RDFa and Microdata.

My current understanding is that RDFa is RDF implemented into HTML but is complicated for new developers like myself, Microdata seems really easy and quick to implement.

What are the other advantages and disadvantages around these two semantic formats ?


Solution

  • Differences between Microdata and RDFa

    While there are many (technical, smaller) differences, here’s a selection of those I consider important (used my answer on Webmasters as a base).

    Specifications

    Applicability

    Use of multiple vocabularies

    Use of reverse properties

    Semantic Web


    The specifications RDFa Core and HTML+RDFa may be more complex than HTML Microdata, but it’s not a "fair" comparison because they offer more features.

    Similar to Microdata would be RDFa Lite (which "does work for most day-to-day needs"), and this spec, at least in my opinion, is way less complex than Microdata.

    What to do?

    If you want to support specific consumers (for example, a search engine and a browser add-on), you should check their documentation about supported syntaxes.

    If you want to learn only one syntax and have no specific consumers in mind, (attention, subjective opinion!) go with RDFa. Why?

    Can’t decide? Use both.

    Note that you can also use several syntaxes for the same content, so you could have Microdata and RDFa (and Microformats, and JSON-LD, and …) for maximum compatibility.

    But it’s typically not necessary/recommended to go down this route.