RDFa (RDF in HTML attributes)

Among all the Semantic Web standards, RDFa is the one which has seen the largest adoption. In 2008, Yahoo! Search Monkey initiated the trend by supporting RDFa-enabled pages. Google followed with its Rich Snippets a year later. In April 2010, it’s Facebook who announced they were using RDFa as part of the Open Graph protocol which has since then been deployed on millions of web pages. You have probably come across RDFa-enhanced websites without even knowing it: White House, O’Reilly, Best Buy, New York Times. And you can also add most Drupal 7 sites to that list. ("The Definitive Guide to Drupal 7")

"RDFa is a thin layer of markup you can add to your web pages that makes them understandable for machines as well as people. You could describe it as a CSS for meaning. By adding it, browsers, search engines, and other software can understand more about the pages, and in so doing offer more services or better results for the user. For instance, if a browser knows that a page is about an event such as a conference, it can offer to add it to your calendar, show it on a map, locate hotels or flights, or any number of other things." RDFa for HTML Authors

HTML pages (HTML4, XHTML or HTML5) do not have to be perfect in order to add RDFa. Most RDFa parsers (e.g. pyRdfa) can extract RDF from RDFa in "buggy" HTML markup but the cleaner the markup, the more reliable the extraction. In general lack of well-formedness is more problematic than misspelt HTML element names or invalid attributes (e.g. missing "alt" for images) since the RDFa parsers have to guess the position of a missing closing element. RDFa added using the "snippet style" is more robust than RDFa interwoven with the existing visible page content..

RDFa 1.1 is defined in the documents RDFa Core 1.1 and XHTML+RDFa 1.1. (Both documents are Last Call Drafts - 20110219).

RDFa Info has examples of RDFa usage, (e.g. Civil Serivce Jobs, eCommerce), a page for RDFa Implementations and a page on How to validate your XHTML+RDFa page.

The RDFa Developer Firefox Add-on lets you visualize all the RDFa data included in a web page, shows a list with errors and warnings found while parsing the document, and allows SPARQL queries to be executed on the RDFa content.

The article W3C Pleased With Semantic Web Adoption by Facebook, Best Buy & Others provides a current (June 29 2010) overview of high profile companies adopting RDFa.


It is considered best-practice to validate XHTML+RDFa pages http://rdfa.info/wiki/Best-practice-rdfa-extractor

How to validate your XHTML+RDFa page http://rdfa.info/wiki/How-to-validate

W3C Markup Validation Service http://validator.w3.org/

RDFa Extractor http://torrez.us/rdfa/

Google announces support for RDFa http://rdfa.info/2009/05/12/google-announces-support-for-rdfa/


http://code.google.com/p/rdfquery/ from jeni tennison for reading RDFa information from the DOM of an HTML page using javascript.

"Simple RDFication of SPARQL SELECT results with RDFa" http://bnode.org/blog/2009/05/26/simple-rdfication-of-sparql-select-resu...

See also RDFa Editors

RDF2RDFa Converter http://www.ebusiness-unibw.org/tools/rdf2rdfa