Skip to main content
Back to Standards
Resource Description Framework in Attributes logo

Resource Description Framework in Attributes

RDFa

A W3C Recommendation that extends HTML and XML languages with a set of attributes for embedding rich structured metadata within web documents. RDFa enables publishers to mark up human-readable content with machine-readable annotations using RDF triples, bridging the gap between visual web content and the Semantic Web. First published in 2008 and updated to RDFa 1.1 in 2012 and RDFa Lite 1.1 as a simplified profile, it is supported by major search engines and content management systems.

Overview

RDFa is a W3C Recommendation that provides a set of HTML and XML attributes for embedding structured metadata directly within web documents. By allowing publishers to annotate visible page content with machine-readable RDF triples, RDFa bridges human-readable web pages and the Semantic Web, enabling search engines, screen readers, and other automated agents to extract precise meaning from markup.

Background

The need for RDFa arose from a fundamental tension in web publishing: HTML communicates effectively with humans but poorly with machines. While RDF provided a powerful framework for machine-readable data, it typically lived in separate files disconnected from the pages users actually visited. The W3C's Semantic Web Deployment Working Group developed RDFa to solve this by letting authors weave structured data into their existing markup. RDFa 1.0 was published as a W3C Recommendation in October 2008, initially targeting XHTML. The specification was substantially revised as RDFa 1.1 in June 2012, broadening its host language support to HTML5 and general XML, and introducing a simplified subset called RDFa Lite 1.1. A second edition of RDFa 1.1 was published in March 2015.

Purpose & Scope

RDFa allows content authors to express subject-predicate-object triples using a small number of attributes added to standard HTML or XML elements. The core attributes include about, typeof, property, resource, rel, rev, content, datatype, vocab, and prefix. Through these attributes, any HTML element can identify a resource, declare its type, and assert relationships or literal values, all inline with the document's visible content.

The specification addresses a broad set of use cases: marking up contact information, event details, product descriptions, breadcrumb navigation, licensing statements, and bibliographic citations. Because the annotations live in the same document that users see, RDFa ensures that human-readable and machine-readable representations stay synchronized.

Key Attributes

Attribute Purpose
vocab Declares a default vocabulary URI for the document or subtree
typeof Specifies the RDF type of a resource
property Names the predicate whose value is the element's content
resource Identifies a specific resource URI
prefix Declares namespace prefixes for use in CURIEs
about Sets the subject of statements in a subtree

RDFa Lite 1.1

Recognizing that the full attribute set could be daunting for casual adopters, the W3C published RDFa Lite 1.1 as a minimal subset containing only five attributes: vocab, typeof, property, resource, and prefix. This simplified profile covers the majority of common annotation use cases and is fully compatible with the complete RDFa specification.

Governance & Maintenance

RDFa was originally developed by the W3C Semantic Web Deployment Working Group and later maintained by the RDFa Working Group. The specifications have been stable since the 2015 second edition. As W3C Recommendations, they follow the W3C Process for any future revisions. The specifications are freely available under the W3C Document License.

Notable Implementations

RDFa has been widely adopted across the web. Google, Bing, Yahoo, and Yandex all recognize RDFa annotations for generating rich search results, alongside Microdata and JSON-LD. Schema.org vocabulary terms can be expressed in RDFa, making it one of three supported syntaxes for structured data on the web. Content management systems including Drupal have built-in RDFa support, automatically annotating content with structured metadata. Government open data initiatives, particularly in the European Union, have used RDFa to publish structured metadata within official web pages.

Related Standards

  • JSON-LD -- An alternative approach to embedding structured data in web pages, using script elements rather than inline attributes
  • Microdata -- Another HTML-embedded metadata syntax with a similar inline approach but different attribute vocabulary
  • Schema.org -- The most commonly used vocabulary with RDFa for web search engine optimization

Further Reading