{
  "id": "rdfa",
  "title": "RDFa",
  "lang": "en",
  "source_lang": "en",
  "summary": "RDFa is a standard for embedding machine-readable RDF data in web documents through markup attributes.",
  "category": "computer-science",
  "subcategory": "software",
  "type": "concept",
  "aliases": [
    "Resource Description Framework in Attributes",
    "RDF in Attributes"
  ],
  "generated_at": "2026-10-14",
  "model": "gpt-6.1-sol",
  "url": "https://aiwiki.page/en/rdfa/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/rdfa/",
      "json": "https://aiwiki.page/zh/rdfa.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "RDFa is a World Wide Web Consortium (W3C) standard for embedding Resource Description Framework (RDF) data in documents using markup attributes. It allows publishers to describe the people, publications, organizations, and other resources mentioned in HTML pages while reusing their human-readable content. RDFa adds machine-readable meaning without, by itself, changing how that content is displayed. (w3.org)"
    },
    {
      "heading": "Data model and purpose",
      "text": "RDFa expresses statements as RDF triples: a subject, a predicate, and an object. For example, a statement can identify a person as its subject, “name” as its predicate, and a text string as its object. Resources and properties are identified using Internationalized Resource Identifiers (IRIs); objects may also be literals, such as text or typed dates. Triples together form an RDF graph. (w3.org)\n\nThe distinction between syntax and vocabulary is fundamental. RDFa specifies how statements are embedded and extracted, not which concepts a publisher must use. Vocabularies such as Schema.org, Dublin Core, and FOAF supply identifiers for classes and properties. Multiple vocabularies can be combined within one document. (w3.org)"
    },
    {
      "heading": "Attributes and processing",
      "text": "RDFa Lite 1.1 defines five principal attributes:\n\nAttribute | Function\nvocab | Establishes a default vocabulary for unprefixed terms.\ntypeof | States the type or types of a resource.\nproperty | Identifies a property whose value is supplied by the element.\nresource | Supplies a resource identifier.\nprefix | Declares prefix mappings for compact identifiers.\n\nRDFa Lite is a subset of full RDFa 1.1, rather than a separate data model. Documents can use additional RDFa features when more complex statements are needed. (w3.org)\n\nFull RDFa also includes about for identifying a subject, rel and rev for expressing relationships, content for supplying a machine-readable literal, datatype for specifying its datatype, and inlist for constructing RDF lists. Existing attributes such as href and src can supply resource identifiers. (w3.org)\n\nProcessing is contextual: an element can inherit vocabulary mappings, language information, and subject context from its ancestors. Consequently, nesting affects the resulting graph; extraction is not simply a matter of reading each attribute independently. RDFa Core defines the general processing model, while host-language specifications provide adaptations for particular document formats. (w3.org)"
    },
    {
      "heading": "Example",
      "text": "The following illustrative fragment identifies a person and supplies a name and homepage:\n\n<div vocab=\"https://schema.org/\"\n     resource=\"#alex\"\n     typeof=\"Person\">\n  <span property=\"name\">Alex Morgan</span>\n  <a property=\"url\" href=\"https://example.org/alex\">\n    Homepage\n  </a>\n</div>\n\nUnder RDFa 1.1 processing, #alex identifies the person relative to the document’s base IRI. The fragment asserts that this resource has type Person, has the name “Alex Morgan,” and has a url property pointing to the linked resource. The visible name and hyperlink also serve as sources for the machine-readable statements. (w3.org)"
    },
    {
      "heading": "Standardization",
      "text": "The first RDFa Recommendation, RDFa in XHTML: Syntax and Processing, was published on 14 October 2008. RDFa 1.1 reached Recommendation status on 7 June 2012, followed by revised editions on 22 August 2013 and 17 March 2015. (w3.org)\n\nVersion 1.1 separated the core rules from XHTML-specific requirements and introduced or expanded facilities including default vocabularies and richer use of property. The specification family includes RDFa Core, RDFa Lite, HTML+RDFa, and XHTML+RDFa. HTML+RDFa defines how the core model applies to HTML documents, including host-specific processing rules. (w3.org)"
    },
    {
      "heading": "Applications and related formats",
      "text": "RDFa supports structured descriptions of publications, people, events, licensing information, and relationships between resources. An RDF-aware consumer can extract these statements for aggregation or querying, rather than relying exclusively on interpreting prose. The resulting graph can be represented in other RDF syntaxes without retaining the original page layout. (w3.org)\n\nJSON-LD provides another way to publish linked data, using JSON structures and optionally embedding them in an HTML script element. RDFa instead associates statements with markup elements and their attributes. Both can represent RDF data; their principal difference is how that data is serialized and integrated into a document. HTML Microdata is another element-and-attribute approach to structured web content, but uses different attributes and processing rules. (w3.org)"
    },
    {
      "heading": "Limitations",
      "text": "RDFa’s reuse of visible content can reduce duplication, but its dependence on document context also creates maintenance risks. Moving an annotated element beneath a different subject or vocabulary declaration can alter the extracted statements. A separately supplied content value can also differ from the text displayed to readers. These risks follow from RDFa’s inheritance and value-selection rules. (w3.org)\n\nEmbedding data does not ensure that every consumer will understand or use it. RDFa defines a representation mechanism; interpretation also depends on the vocabulary and the consuming application. It neither verifies the truth of published statements nor makes arbitrary vocabulary terms interchangeable. (w3.org)"
    }
  ],
  "links": [
    "html",
    "json-ld",
    "microdata-html"
  ],
  "sources": [
    {
      "title": "RDFa 1.1 Primer - Third Edition",
      "url": "https://www.w3.org/TR/rdfa-primer/"
    },
    {
      "title": "RDF 1.1 Primer",
      "url": "https://www.w3.org/TR/rdf11-primer/"
    },
    {
      "title": "RDFa Lite 1.1 - Second Edition",
      "url": "https://www.w3.org/TR/rdfa-lite/"
    },
    {
      "title": "RDFa Core 1.1 - Third Edition",
      "url": "https://www.w3.org/TR/rdfa-core/"
    },
    {
      "title": "HTML+RDFa 1.1 - Second Edition",
      "url": "https://www.w3.org/TR/html-rdfa/"
    },
    {
      "title": "RDFa in XHTML: Syntax and Processing",
      "url": "https://www.w3.org/TR/rdfa-syntax/rdfa-syntax-diff.html"
    },
    {
      "title": "RDFa Core 1.1 - Third Edition publication history",
      "url": "https://www.w3.org/standards/history/rdfa-core/"
    },
    {
      "title": "JSON-LD 1.1",
      "url": "https://www.w3.org/TR/json-ld11/"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}