RDFa Core 1.1 [[!RDFA-CORE]] defines attributes and syntax for embedding semantic markup in Host Languages. This document defines one such Host Language. This language is a superset of XHTML 1.1 [[XHTML11-2e]], integrating the attributes as defined in RDFa Core 1.1. This document is intended for authors who want to create XHTML Family documents that embed rich semantic markup.

This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

This version represents minor editorial changes and changes to references. No other changes were made from the original version of the Recommendation.

This is a revision of Sections 8 and 9 and Appendix A of RDFa Syntax 1.0 [[RDFA-SYNTAX]]. This document supersedes those sections of the previous Recommendation. There are a number of substantive differences between this version and its predecessor, including:

  1. Inheritance of basic processing rules from [[!RDFA-CORE]].
  2. The inclusion of an implementation of the markup language using XML Schema.
  3. The addition of lang to be consistent with recent changes in [[XHTML11-2e]].
  4. Removal of the collection of TERMs from this document - instead deferring the definitions in an RDFa Initial Context document.

A sample test harness is available. This set of tests is not intended to be exhaustive. Users may find the tests to be useful examples of RDFa usage.

The implementation report used by the director to transition to Recommendation has been made available. There have been no formal objections to the publication of this document.


XHTML+RDFa 1.1 is an XHTML Family markup language. It extends the XHTML 1.1 markup language with the attributes defined in RDFa Core 1.1. The document also defines an XHTML Modularization-compatible [[!XHTML-MODULARIZATION11-2e]] module for the RDFa Core attributes in both XML DTD and XML Schema formats.

Document Conformance

A strictly conforming XHTML+RDFa document is a document that requires only the facilities described as mandatory in this specification. Such a document satisfies the following criteria:

  1. The document MUST conform to the constraints expressed in the schemas in Appendix A - XHTML+RDFa XML Schema and Appendix B - XHTML+RDFa Document Type Definition.

  2. The local part of the root element of the document MUST be html.

  3. The start tag of the root element of the document MUST explicitly contain a default namespace declaration for the XHTML namespace [[!XML-NAMES11]]. The namespace URI for XHTML is defined to be http://www.w3.org/1999/xhtml.

    The start tag MAY also contain the declaration of the XML Schema Instance Namespace and an XML Schema Instance schemaLocation attribute [[!XMLSCHEMA11-2]]. Such an attribute would associate the XHTML namespace http://www.w3.org/1999/xhtml with the XML Schema at the URI http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd.

  4. There MAY Be a version attribute on the html element with the value "XHTML+RDFa 1.1".

Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. XHTML document authors SHOULD use XML declarations in all their documents. XHTML document authors MUST use an XML declaration when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding is specified by a higher-level protocol.

XHTML+RDFa documents SHOULD be labeled with the Internet Media Type "application/xhtml+xml" as defined in [[!RFC3236]]. For further information on using media types with XHTML Family markup languages, see the informative note [[XHTML-MEDIA-TYPES]].

User Agent Conformance

A conforming user agent MUST support all of the features required in this specification. A conforming user agent must also support the User Agent conformance requirements as defined in XHTML Modularization [[!XHTML-MODULARIZATION11-2e]] section on "XHTML Family User Agent Conformance".

Additional RDFa Processing Rules

Documents conforming to the rules in this specification are processed according to [[!RDFA-CORE]] with the following extensions:

When an XHTML+RDFa document uses version on the html element, a conforming RDFa Processor MUST examine the value of this attribute. If the value matches that of a defined version of XHTML+RDFa, then the processing rules for that version MUST be used. If the value does not match a defined version, or there is no version attribute, then the processing rules for the most recent version of XHTML+RDFa must be used.

XHTML+RDFa 1.1 Definition

The XHTML+RDFa 1.1 document type is a fully functional document type with rich semantics. It is a superset of [[!XHTML11-2e]].

The XHTML+RDFa 1.1 document type is made up of the following XHTML modules. The elements, attributes, and content models associated with these modules are defined in "XHTML Modularization" [[!XHTML-MODULARIZATION11-2e]]. The elements are listed here for information purposes, but the definitions in XHTML Modularization should be considered authoritative.

Structure Module
body, head, html, title.
Text Module
abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
Hypertext Module
a. href is available on all elements.
List Module
dl, dt, dd, ol, ul, li
Object Module
object, param
Presentation Module
b, big, hr, i, small, sub, sup, tt
Edit Module
del, ins
Bidirectional Text Module
Forms Module
button, fieldset, form, input, label, legend, select, optgroup, option, textarea
Table Module
caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr
Image Module
Client-side Image Map Module
area, map
Server-side Image Map Module
Attribute ismap on img
Intrinsic Events Module
Events attributes
Metainformation Module
Scripting Module
noscript, script
Stylesheet Module
style element
Style Attribute Module Deprecated
Target Module
Link Module
Base Module
Metainformation Attributes Module
about, content, datatype, typeof, prefix, property, rel, resource, rev, vocab are available on all elements.
Ruby Annotation Module from [[!RUBY]]
ruby, rbc, rtc, rb, rt, rp

This specification also adds the lang attribute to the I18N attribute collection as defined in [[!XHTML-MODULARIZATION11-2e]]. The lang attribute is defined in [[!HTML401]]. When this attribute and the xml:lang attribute are specified on the same element, the xml:lang attribute takes precedence. When both lang and xml:lang are specified on the same element, they MUST have the same value.

There are no additional definitions required by this document type. An implementation of this document type as an XML Schema is defined in Appendix A, and as an XML DTD is defined in Appendix B.

Metainformation Attributes Module

The Metainformation Attributes Module defines the Metainformation attribute collection in the format required by [[!XHTML-MODULARIZATION11-2e]]. This collection allows elements to be annotated with metadata throughout an XHTML Family document. When this module is included in a markup language, this collection is added to the Common attribute collection as defined in [[!XHTML-MODULARIZATION11-2e]].

Metainformation Attributes Collection

The following attributes are included in the attribute collection, and take values in the associated datatype:

Metainformation Attribute Collection
Attributes Notes
about (SafeCURIEorCURIEorIRI)  
content (CDATA)  
datatype (TERMorCURIEorAbsIRI) If not specified, then the default value is string as defined in [[!XMLSCHEMA11-2]].
prefix( NCName ': ' IRI )+  
property (TERMorCURIEorAbsIRIs)  
rel (TERMorCURIEorAbsIRIs)
resource (SafeCURIEorCURIEorIRI)  
rev (TERMorCURIEorAbsIRIs)
typeof (TERMorCURIEorAbsIRIs)  
vocab (IRI) An IRI that defines the prefix to use when a CURIE is specified with no prefix and no colon.

An implementation of this module in XML Schema can be found in Appendix A and in XML DTD in Appendix B.

XHTML RDFa Initial Context

This specification defines an RDFa Initial Context. It is available at http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1.


This appendix is normative.

This appendix includes an implementation of the XHTML+RDFa 1.1 language using XML Schema. It is implemented by combining the XHTML 1.1 Schema with the XHTML Metainformation Attribute Module. This is done by using a content model module, and then a driver module. There are direct links to the various files for download purposes. Please note that the files targeted by the "latest version" links may change slowly over time. See the W3C XHTML2 Working Group home page for more information.

XHTML Metainformation Attributes Module

XHTML+RDFa Schema Content Model Module

XHTML+RDFa Schema Modules

XHTML+RDFa XML Schema Driver Module

XHTML+RDFa Document Type Definition

This appendix includes an implementation of the XHTML+RDFa 1.1 language as an XML DTD. It is implemented by combining the XHTML 1.1 DTD with the XHTML Metainformation Attribute Module. This is done by using a content model module, and then a driver module. There are direct links to the various files for download purposes. Please note that the files targeted by the "latest version" links may change slowly over time. See the W3C XHTML2 Working Group home page for more information.

XHTML Metainformation Attributes Module

XHTML+RDFa Content Model Module

XHTML+RDFa Driver Module

SGML Open Catalog Entry for XHTML+RDFa

This section contains the SGML Open Catalog-format definition [[SGML-CATALOG]] of the public identifiers for XHTML+RDFa 1.1.

Deployment Advice

Documents written using the markup language defined in this specification can be validated using the DTD defined in Appendix B. If a document author wants to facilitate such validation, they may include the following declaration at the top of their document:


The XML Namespace document associated with the XHTML Family of markup languages uses the mechanism for transforming XHTML+RDFa documents into RDF as defined by [[GRDDL]]. Authors who want to be certain their documents are transformable by all [[GRDDL]] processors may also include a profile attribute on the head element that includes a reference to the RDFa Initial Context IRI http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1.

Change History

2010-02-25: First version of the split-out XHTML specialization.


At the time of publication, the members of the RDF Web Applications Working Group were: