Existing browsers preserve unknown attributes in the DOM and
otherwise ignore them, so the binding degrades safely before native
browser support exists. HTML validators may report these attributes as
nonconforming until they are incorporated into an applicable HTML
specification or extension.
The Core Model is independent of this spelling. A different
host-language binding may use different surface syntax while preserving
the same assertion boundaries and term-construction rules.
“Key” is an HTML-authoring concept in this binding. A key correlates
occurrences within one extraction of a document or one of its fragments;
it is not an RDF identifier and does not survive into the RDF dataset.
The extractor maps each distinct key to a blank node. Core 0.1 fixes the
positional rdf-subject-key, rdf-object-key,
and rdf-graph-key surface because RDF permits independent
blank nodes in all three positions and a generic key would require an
embedded role syntax or contextual inference.
RDF
RDF
RDF
RDF
Reading the attributes
Reading the attributes
The examples in this section assume the HTML document IRI is
https://example.com/page and use the Turtle prefixes
ex:, rdf:, schema:, and
xsd: with their conventional meanings.
An element bearing rdf-predicate is a statement
carrier. By default, it also represents the statement’s
subject. Its attributes and native HTML identity answer four independent
questions:
RDF
RDF
- What RDF term is the statement about? This is the
subject.
- What relationship or property is being stated? This is the
predicate.
- What is the value or other RDF term at the end of that relationship?
This is the object.
- In which graph is the statement asserted? This is the optional graph
name.
For example, this identified heading describes itself:
RDF
RDF
RDF
snippet
text/html
<h1
id="alice"
rdf-predicate="https://schema.org/name"
>Alice</h1>
RDF
RDF
RDF
text/turtle
RDF
<https://example.com/page#alice> schema:name "Alice" .
The h1 is both the statement carrier and the
subject-bearing HTML element. Its id gives it the fragment
IRI https://example.com/page#alice;
rdf-predicate supplies schema:name; and its
text supplies the literal object "Alice".
If a statement carrier has no explicit subject attribute and no
non-empty id, it still describes itself, but its RDF
subject is a fresh blank node associated with that element for this
extraction:
RDF
RDF
RDF
snippet
text/html
<span rdf-predicate="https://schema.org/name">Alice</span>
RDF
RDF
RDF
text/turtle
RDF
_:generated schema:name "Alice" .
The Turtle label is illustrative and need not be stable between
extractions.
Another element can describe the identified element by referring
explicitly to its fragment IRI. The identified element need not carry a
statement itself:
RDF
RDF
RDF
snippet
text/html
<article id="alice">
<h1
rdf-subject="#alice"
rdf-predicate="https://schema.org/name"
>Alice</h1>
<a
href="https://example.com/bob"
rdf-subject="#alice"
rdf-predicate="https://schema.org/knows"
>Bob</a>
</article>
RDF
RDF
RDF
text/turtle
RDF
<https://example.com/page#alice> schema:name "Alice" ;
schema:knows ex:bob .
The h1 and a do not inherit the article’s
subject. Each contains the explicit IRI reference #alice,
which happens to identify the parent element. Moving either statement
elsewhere in the document does not change its subject. The article’s
id makes it referable; it does not assert a triple because
the article has no rdf-predicate.
The Turtle semicolon is only serialization shorthand. The RDF graph
contains two complete triples, just as the HTML contains two complete
statement elements.
HTML authors choose a carrier according to the page’s ordinary
information architecture. RDF extraction does not prefer visibly
semantic markup over an exact-value or metadata carrier. Given an event
represented by <article id="launch">, each of the
following alternatives expresses the same typed literal:
RDF
RDF
RDF
snippet
text/html
<!-- Visible, semantically appropriate HTML -->
<time
datetime="2026-09-01"
rdf-subject="#launch"
rdf-predicate="https://schema.org/startDate"
rdf-datatype="http://www.w3.org/2001/XMLSchema#date"
>September 1, 2026</time>
RDF
RDF
RDF
snippet
text/html
<!-- A visible label with a separately preserved machine value -->
<data
value="2026-09-01"
rdf-subject="#launch"
rdf-predicate="https://schema.org/startDate"
rdf-datatype="http://www.w3.org/2001/XMLSchema#date"
>Launch date</data>
RDF
RDF
RDF
snippet
text/html
<!-- Metadata-only carriage, for example in head -->
<meta
name="date"
content="2026-09-01"
rdf-subject="#launch"
rdf-predicate="https://schema.org/startDate"
rdf-datatype="http://www.w3.org/2001/XMLSchema#date"
>
All three extract as:
RDF
RDF
RDF
text/turtle
RDF
<https://example.com/page#launch>
schema:startDate "2026-09-01"^^xsd:date .
The first form contributes native time semantics and human-readable
presentation. The second preserves a lexical value while allowing
different visible text. The third carries information without visible
presentation. This interchangeability is intentional: authors should use
the HTML element that best fits the document while the RDF attributes
preserve one extraction model.
The examples below explain each attribute individually. Their Turtle
prefixes are:
RDF
RDF
RDF
text/turtle
RDF
PREFIX ex: <https://example.com/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <https://schema.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
RDF
RDF
RDF
RDF
rdf-version
rdf-version
RDF
RDF
RDF
snippet
text/html
<html rdf-version="1.2">
This attribute announces the binding and RDF version used by the
document. It belongs only on the document’s html element,
configures extraction, and does not emit a triple. Its Turtle 1.2
serialization counterpart is the version directive:
RDF
RDF
RDF
text/turtle
RDF
VERSION "1.2"
For a document extraction, rdf-version="1.2" selects
this Core 0.1 processing model. If rdf-version is absent,
the extractor MUST process the document as version 1.2 and
report a missing-version diagnostic. If the value is present but
unsupported, the extractor MUST report an unsupported-version diagnostic
and MUST NOT extract a dataset under guessed semantics.
For a DocumentFragment extraction, the caller MAY supply
the binding version explicitly. Otherwise, the extractor uses a
supported rdf-version on the fragment’s owner document. If
neither exists, it applies the same version-1.2 default and
diagnostic. An rdf-version attribute anywhere other than
the document’s html element has no processing effect and
produces a diagnostic.
HTML parsing resolves duplicate source attributes before RDF
extraction; the extractor uses the single rdf-version value
present in the resulting DOM. Duplicate-attribute parse errors are
therefore an HTML conformance matter rather than RDF version
negotiation.
RDF
RDF
RDF
RDF
rdf-subject
rdf-subject
rdf-subject explicitly overrides the subject derived
from the statement element. It is useful when the statement describes
another element, the document itself, or any resource whose IRI is not
the carrier’s own identity. Fragment-only values such as
#alice refer within the source document; other relative
values resolve against the document base IRI.
RDF
RDF
RDF
snippet
text/html
<data
value="Alice"
rdf-subject="https://example.com/alice"
rdf-predicate="https://schema.org/name"
></data>
RDF
RDF
RDF
text/turtle
RDF
ex:alice schema:name "Alice" .
Here the explicit attribute makes the subject
https://example.com/alice, regardless of whether the
data element has an id. The literal object is
obtained from value.
An empty value is meaningful rather than missing:
RDF
RDF
RDF
snippet
text/html
<data
value="IA² HTML/RDF"
rdf-subject=""
rdf-predicate="https://schema.org/name"
></data>
RDF
RDF
RDF
text/turtle
RDF
<https://example.com/page> schema:name "IA² HTML/RDF" .
Because "" is the empty relative IRI reference, it
resolves to the document base IRI—which is the document’s own IRI in
this example.
RDF
RDF
RDF
RDF
rdf-subject-key
rdf-subject-key
Some RDF subjects have identity within the dataset but no IRI.
rdf-subject-key overrides the element’s self-subject with
the blank node selected by an extraction-local correlation key.
Repeating that key in any key-bearing RDF position refers to the same
blank node during this extraction.
RDF
RDF
RDF
snippet
text/html
<cite
rdf-subject-key="work"
rdf-predicate="https://schema.org/name"
>The Dispossessed</cite>
RDF
RDF
RDF
text/turtle
RDF
_:work schema:name "The Dispossessed" .
Here cite retains its normal HTML meaning and visible
presentation while its text also supplies the RDF literal. The source
key work is not an RDF term. The Turtle blank-node label is
illustrative, and a serializer may replace it while preserving
blank-node identity.
rdf-subject and rdf-subject-key are
mutually exclusive overrides. Use rdf-subject for an
explicit IRI subject and rdf-subject-key for a reusable
extraction-local subject. If neither is present, the statement element
itself supplies the subject: a non-empty id produces a
fragment IRI, and an element without one produces a fresh blank
node.
RDF
RDF
RDF
RDF
rdf-predicate
rdf-predicate
rdf-predicate marks the element as a statement carrier
and supplies the relationship between its subject and object. A
predicate is always an IRI. Merely placing an annotated element inside
another annotated element does not create a relationship.
RDF
RDF
RDF
snippet
text/html
<a
href="/license"
rdf-subject=""
rdf-predicate="http://purl.org/dc/terms/license"
>License</a>
RDF
RDF
RDF
text/turtle
RDF
<https://example.com/page>
<http://purl.org/dc/terms/license>
<https://example.com/license> .
In this example, rdf-subject="" denotes the document,
rdf-predicate denotes the license relationship, and
href denotes the license resource used as the object.
RDF
RDF
RDF
RDF
rdf-object-key
rdf-object-key
rdf-object-key makes the object the
blank node selected by an extraction-local key. A matching
rdf-subject-key can then use that same resource as another
statement’s subject.
RDF
RDF
RDF
snippet
text/html
<address
rdf-object-key="address"
rdf-subject="https://example.com/alice"
rdf-predicate="https://schema.org/address"
>
<span
rdf-subject-key="address"
rdf-predicate="https://schema.org/addressLocality"
>Vancouver</span>
</address>
RDF
RDF
RDF
text/turtle
RDF
ex:alice schema:address _:address .
_:address schema:addressLocality "Vancouver" .
The outer address element carries the statement
connecting Alice to an unnamed address. The inner span
carries a second statement about that same blank node. The shared local
key—not the HTML nesting—joins the statements; the address
element simultaneously retains its native human-facing meaning.
RDF
RDF
RDF
RDF
rdf-datatype
rdf-datatype
rdf-datatype gives the datatype IRI for a literal
object. It is the HTML binding of the information written after
^^ in Turtle; the literal’s lexical form still comes from
element text, data[value], time[datetime], or
meta[content].
RDF
RDF
RDF
snippet
text/html
<time
datetime="2026-09-01"
rdf-subject="https://example.com/conference"
rdf-predicate="https://schema.org/startDate"
rdf-datatype="http://www.w3.org/2001/XMLSchema#date"
>September 1, 2026</time>
RDF
RDF
RDF
text/turtle
RDF
ex:conference schema:startDate "2026-09-01"^^xsd:date .
The lexical form comes from native datetime, while the
human-readable text remains free to follow the page’s presentation
style. rdf-datatype cannot be combined with a language tag
because an RDF literal is either datatype-qualified or language-tagged.
Native lang and dir are explained in §5.5.
RDF
RDF
RDF
RDF
rdf-graph
rdf-graph
On a statement element, rdf-graph places that triple in
the named graph identified by an IRI. On a non-statement element, it
declares the IRI-named graph without adding a triple, as defined in
§5.6. It does not establish a scope for descendants or siblings; every
statement assigned to that graph repeats the attribute.
RDF
RDF
RDF
snippet
text/html
<a
href="https://example.com/bob"
rdf-subject="https://example.com/alice"
rdf-predicate="https://schema.org/knows"
rdf-graph="https://example.com/graphs/public"
>Bob</a>
Turtle serializes one RDF graph and therefore cannot carry its graph
name. The RDF dataset equivalent uses TriG, the Turtle-family dataset
syntax:
RDF
RDF
RDF
application/trig
RDF
<https://example.com/graphs/public> {
ex:alice schema:knows ex:bob .
}
RDF
RDF
RDF
RDF
rdf-graph-key
rdf-graph-key
rdf-graph-key is the local-identity counterpart to
rdf-graph. On a statement element, it places that triple in
the blank-node-named graph selected by an extraction-local key. On a
non-statement element, it declares that graph without adding a triple,
as defined in §5.6.
RDF
RDF
RDF
snippet
text/html
<img
src="https://example.com/photos/alice.jpg"
alt="Alice at the conference"
rdf-subject="https://example.com/alice"
rdf-predicate="https://schema.org/image"
rdf-graph-key="observations"
>
Again, the dataset equivalent requires TriG:
RDF
RDF
RDF
application/trig
RDF
_:observations {
ex:alice schema:image <https://example.com/photos/alice.jpg> .
}
The image remains ordinary accessible page content. Its native
src supplies the IRI object; alt remains
presentation and accessibility text rather than a second RDF value.
RDF
RDF
RDF
RDF
Triple-term object template
Triple-term object template
A direct child template used as a statement’s object
carrier has one internal statement that constructs an RDF 1.2 triple
term. No RDF-specific attribute is needed on the template: its
object-carrier position supplies the meaning. The inner triple is used
as the outer statement’s object but is not thereby asserted as a graph
statement.
RDF
RDF
RDF
snippet
text/html
<aside
rdf-subject-key="claim"
rdf-predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies"
>
<p>This claim is recorded for provenance review.</p>
<template>
<a
href="https://example.com/bob"
rdf-subject="https://example.com/alice"
rdf-predicate="https://schema.org/knows"
>Bob</a>
</template>
</aside>
RDF
RDF
RDF
text/turtle
RDF
_:claim rdf:reifies <<( ex:alice schema:knows ex:bob )>> .
The aside can present human-facing context while its
direct inert template supplies the RDF object. The triple inside
<<( ... )>> is a triple term. It is not
asserted by this Turtle statement, matching the inert template’s
behavior. A template that is not selected as a statement’s object
carrier has no special RDF meaning in the containing extraction.