RDFa, short for Resource Description Framework in Attributes, is a W3C syntax for embedding structured data directly in HTML, XHTML and SVG by adding attributes such as vocab, typeof and property to existing elements. In structured data for SEO, it is one of three formats that search engines accept for marking up entities, alongside JSON-LD and Microdata, and it is most often paired with the Schema.org vocabulary.
Because RDFa annotates the visible content itself, the same text serves both human readers and machines. That tight coupling is its defining advantage and its main maintenance burden.
How RDFa expresses data inside HTML
RDFa maps HTML markup onto the RDF data model, in which every statement is a triple of subject, predicate and object. The element carrying typeof creates a subject of a given type, each nested element with a property attribute adds a predicate, and the element text or an attribute value becomes the object. A parser walks the document tree and extracts these triples without altering what the browser displays.
A minimal product snippet looks like this in practice: a container with vocab="https://schema.org/" typeof="Product", a heading with property="name" and a nested block with property="offers" typeof="Offer" holding the price. The nesting of elements defines the nesting of entities, so the offer automatically belongs to the product above it.
The current specification is RDFa 1.1, published as a W3C Recommendation in 2012 and revised in 2015. Its lighter subset, RDFa Lite, uses only five attributes and covers nearly all SEO use cases.
Core RDFa attributes
RDFa Lite defines the five attributes listed below, and the full RDFa 1.1 syntax adds several more for advanced linking. Knowing what each attribute does prevents the most common parsing errors.
| Attribute | Purpose | Typical value |
|---|---|---|
| vocab | Sets the default vocabulary | https://schema.org/ |
| typeof | Declares the type of a new entity | Product, Event, Person |
| property | Names a property of the current entity | name, price, startDate |
| resource | Gives the entity an identifier URI | #organization |
| prefix | Maps short prefixes to other vocabularies | og: https://ogp.me/ns# |
Full RDFa also supports about, rel, rev, href, src, content and datatype. The content attribute is particularly useful because it supplies a machine-readable value, such as an ISO 8601 date, while the visible text remains human-friendly.
RDFa compared with JSON-LD and Microdata
All three formats can express the same Schema.org data, and Google states that they are equally valid for rich results when implemented correctly. The practical differences lie in placement, maintenance and tooling, as the comparison shows.
| Aspect | RDFa | JSON-LD | Microdata |
|---|---|---|---|
| Location | HTML attributes | Separate script block | HTML attributes |
| Coupling to content | Tight | None | Tight |
| Multiple vocabularies | Native via prefixes | Via context | Awkward |
| Ease of maintenance | Moderate | High | Moderate |
| Google preference | Supported | Recommended | Supported |
| Standards body | W3C Recommendation | W3C Recommendation | WHATWG HTML section |
JSON-LD is Google’s recommended format because it can be added or generated without touching the visual template. RDFa remains strong where mixing vocabularies matters, for example combining Schema.org, Dublin Core and the Open Graph protocol in a single document, and in publishing systems that already produce semantic HTML.
Where RDFa is used in practice
RDFa has a long history in content management systems and linked data projects. Drupal adopted it in its core from version 7, many library and government portals use it to publish open data, and the Open Graph protocol for social sharing was originally defined in RDFa terms, which is why property="og:title" appears in meta tags.
The decision to choose RDFa today should depend on the publishing stack and the team. The table below gives practical guidance for typical situations.
| Situation | Recommended format | Reason |
|---|---|---|
| CMS already outputs RDFa | Keep RDFa | Avoids duplicate or conflicting markup |
| New site built on templates | JSON-LD | Easier to generate and test separately |
| Linked open data publishing | RDFa | Native RDF semantics and vocabulary mixing |
| Data not visible on the page | JSON-LD | RDFa is designed for visible content |
| Strict content-markup parity needed | RDFa | Data cannot drift from the visible text |
Mixing formats on one page is technically allowed, and parsers merge statements that share an identifier. In practice, however, one format per entity is the safer rule. When a CMS emits RDFa and a plugin adds JSON-LD for the same product, search engines may see two conflicting prices or ratings, and diagnosing which source is wrong becomes slow. Teams migrating between formats should remove the old markup in the same release that introduces the new one.
Validation and common RDFa errors
RDFa markup should be checked with both the Schema Markup Validator, which reports generic Schema.org parsing, and the Rich Results Test, which shows whether Google considers a page eligible for specific search features. Passing one does not guarantee passing the other, because rich result eligibility adds feature-specific required properties.
- Missing vocab declaration, which leaves properties without a namespace and produces no usable data.
- Broken nesting after template changes, so an offer or review detaches from its parent product.
- Formatted values without content attributes, such as a localized date that parsers cannot interpret.
- Duplicate markup in two formats describing the same entity with different values.
- Marking up hidden or misleading content, which violates structured data guidelines and risks a manual action.
The most frequent long-term failure is silent breakage during redesigns. Because RDFa lives inside presentation markup, front-end developers may remove attributes without realizing their function, so automated structured data monitoring is a sensible safeguard.
A non-technical view
A web page is written for people. Search engines also want to understand its facts, such as which number is a price. RDFa adds small invisible labels to the words already on the page. A machine can then read them as organized facts.
Think of sticky notes placed on items in a shop window. Shoppers see the same display, but a stock checker can read every note. The main point is that RDFa keeps the labels and the visible content together. That keeps them consistent, but a page redesign can break them easily.
A concrete example
A regional museum runs its website on a CMS that already outputs RDFa for every page. The web team wants exhibition listings to show dates and venue details in search results, so it extends the existing templates with typeof="Event" on each listing, property="name" on the title and property="startDate" with a content attribute holding 2026-03-14 beside the human-readable date.
The team also adds property="location" typeof="Place" with a nested address. After the Rich Results Test confirms that all required properties are present, the pages are recrawled within about two weeks. Exhibition listings begin to appear with event dates in search results, and the team avoids maintaining a second JSON-LD layer that could contradict the visible content.