The Resource Description Format in Attributes (RDFa) is an extension of HTML that provides context to content using a whole new set of bespoke attributes. The main syntax is known as RDFa Core, and a simple subset called RDFa Lite is also available. Both rely on predefined schema (descriptions of data) to describe content.
Better than telling you what that means, I’ll show you (those years at screenwriting school didn’t go to waste!). One common item of data across the Web, especially on blogs and news sites, is a date. Quite often you’ll see a date marked up something like this:
<p class="date">2013-04-01</p>
The markup is functional and uncomplicated, but the only semantic context is provided by the class name. With RDFa Lite, you can make this more meaningful and let other machines know this is a date by using the new property attribute:
<p property="http://purl.org/dc/elements/1.1/date">2013-04-01</p>
The value of the attribute is the URL of the relevant description of the term “date” from a schema that is part of a standardized vocabulary known as the Dublin Core.
You probably noticed that the date I’ve used isn’t in a very reader-friendly format. This is a drawback of RDFa Lite: All the content must be formatted in a strictly machine-readable way. To provide content better suited for humans, you must use RDFa Core. With RDFa Core, I can give one set of information to machines and another to people, using the content attribute:
<p property="http://purl.org/dc/elements/1.1/date" content="2013-04-01">April 1</p>
What the reader sees is the content of the element; what the machine sees is the value of the attribute. It means extra markup, but everybody’s happy.
As with microformats, some search engines look for common RDFa patterns to improve their search results. I’ll go into this in more detail in Rich Snippets.