CC REL by Example
CC REL by Example
Table of Contents
Foreward
Basic Marking
License metadata
License metadata with license image
Attribution metadata
More metadata: Title, type, and subjects.
Individual Objects on a Page
Text Block
Images
Video
HTML5 video with one source tag and metadata
HTML5 video with multiple source tags
Non-HTML5 video
Datasets
CC BY dataset, with license and attribution metadata
CC0 dataset, with license and attribution metadata
Multiple CC Licenses on a Page
Multiple CC objects: Text and Image
Attributing Reuses
Attributing a single-source remix
Attributing a multiple-source remix
Public Domain Content
CC0
Public Domain Mark
Marking Copyright Registration
Marking a work as registered (CC Network)
More Resources
Foreward
This resource assumes some basic knowledge of HTML and RDFa. Many of the later examples build on ideas from previous examples. If there is something in an example that isn't explained, check previous examples for an explanation.
Validating your RDFa can help you catch syntax errors or other problems with your metadata. For more information on RDFa validation, see the
How-tovalidate page
on the RDFa wiki.
This resource contains material adapted from
ccREL: The Creative Commons Rights Expression Language
by
Creative Commons
, which is available under a
Creative Commons Attribution 3.0 Unported License
Basic Marking: One page, One License
A very common use of Creative Commons licenses is to license a page on the web and the content contained within under a CC license. For example, many blogs are licensed under a Creative Commons license. It's common for these sites to include CC license information at the bottom of every page in a footer, similar to how people often include copyright ownership year and information at the end of a page.
Below are examples of how you would indicate that a single page on the web is licensed under CC. This is useful when integrating a CC license mark into a footer of a website.
License metadata
↳ See example HTML
Explanation
This page, by
Lawrence Lessig,
is licensed under a
rel="license"
href="https://creativecommons.org/licenses/by/3.0/">
Creative Commons Attribution License.
This is a very basic example of how to include license metadata in HTML documents. The only metadata is provided by the
rel="license"
attribute in the
tag.
rel="license"
generates a triple with predicate
xhtml:license
. The triple relates the current document URI to the URI of the CC BY license to the URI for the
xhtml:license
predicate (
).
How does this all occur by simply adding a single
rel="license"
attribute?
xhtml
is the default prefix for reserved XHTML values, including
license
, which means that you don't need to do anything special to use it (like define the
xhtml
namespace). It is a built-in
rel
type. And the object of the
rel="license"
attribute is just set by the URL in the
href
attribute, which is true for all
rel
attributes.
RDFa Primer: Licensing Your Work
License metadata with license image
↳ See example HTML
Explanation
rel="license"
href="https://creativecommons.org/licenses/by/3.0/">
This page, by
Lawrence Lessig,
is licensed under a
Creative Commons Attribution License.
You can add
rel="license"
to any tag with a valid
href
attribute. This means that for links to the license, anything can be between the
tags, including an image of the license mark.
In this example, the CC BY license mark is a link, with
rel="license"
metadata, to the license deed.
Attribution metadata
↳ See example HTML
Explanation

This page, by
property="cc:attributionName"
rel="cc:attributionURL"
href="http://lessig.org/">Lawrence Lessig,
is licensed under a
Creative Commons Attribution License.
This example shows how to include CC REL metadata into your HTML. This metadata is what enables the CC license deeds to give users copy-and-paste attribution HTML. To see an example of how the CC license deeds use this metadata, go to the example HTML and click on the license badge.
xmlns:cc
associates the prefix
cc
with the URL
throughout the
div
. This is critical for valid RDFa.
property
generates a new triple with predicate
cc:attributionName
, and the text content of the element, in this case
Lawrence Lessig
, as the object. Note that the line does not break after the end of the opening
tag surrounding
Lawrence Lessig
. In the most recent draft of the RDFa specification, the text linked to by the
tag (the
literal
) would be processed to include any whitespaces within the
tag, including line breaks. Whitespace is not stripped from literals by RDFa processors that conform to the specification. When publishing RDFa it is important to remember this; that when parsed for RDFa, the format of your HTML could change the value of a literal to something other than what you might have expected.
rel="cc:attributionURL"
generates a new triple with predicate
cc:attributionURL
, and the URL in the
href
as the object. The attribution URL is important when you want to indicate what URL re-users of your CC-licensed work should link to when they attribute your work. This URL should appear in the license deed when someone clicks on your link to the CC license.
CC REL: Work Properties
More metadata: Title, type, and subjects.
↳ See example HTML
Explanation
typeof="cc:Work"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/">

property="dct:title"
>The Lessig Blog,
rel="dct:type"
href="http://purl.org/dc/dcmitype/Text">
collection of texts
by
rel="cc:attributionURL"
href="http://lessig.org/">Lawrence Lessig,
is licensed under a
Creative Commons Attribution License.
Here build on the previous example to include new metadata:
about
defines the subject of all triples within the
div
. Here we have
about=""
, which defines the subject to be the URL of the current document. When making assertions about the current document, or current URL, you do not need to specify that
about=""
. It is included here for completeness.
typeof="cc:Work"
indicates that the current resource has the class of
cc:Work
, which in the
namespace is described as "a potentially copyrightable work".
In addition to the cc namespace declaration (
xmlns:cc="http://creativecommons.org/ns#"
), we declare the Dublin Core Terms namespace (
xmlns:dct="http://purl.org/dc/terms/"
). This puts many more terms at our disposal.
Because we've declared the
dct
namespace, we can use terms like
dct:title
. We've embedded it in a
span
with the
property
attribute. The object of this assertion (that the current document has a
dct:title
) would be the
literal
between the
span
tags. In this case, the literal is
The Lessig Blog
. As noted above: Be careful not to include unnecessary whitespace in your literals, as this would change the assertion you are making.
CC REL: Work Properties
Individual objects on a page
Text block
Block of text, with license and attribution metadata
↳ See example HTML
Explanation
This text is not marked as CC licensed.
id="uniqueID"
This text is licensed under a
rel="license"
href="https://creativecommons.org/licenses/by/3.0/">
Creative Commons Attribution License.
When embedding RDFa metadata into HTML, you aren't limited to making statements about the current URL. With the
about
attribute, you can set the subject of your triples to any arbitrary URI. In this example, we've set
about="#uniqueID"
, which means that any RDFa within the
div
that has the
about="#uniqueID"
will have the HTML tag with
id="uniqueID"
as its subject. In this example, we have indicated that the
div
with
id="uniqueID"
is has a
rel="license"
of
RDFa Primer: Multiple Items per Page
Images
Image with license, attribution, and work metadata
↳ See example HTML
Explanation
xmlns:dct="http://purl.org/dc/terms/"
xmlns:cc="http://creativecommons.org/ns#">

This image, entitled
property="dct:title"
>Sharing Creative Works,
by property="cc:attributionName"
rel="cc:attributionURL dct:creator"
>Creative Commons
is licensed under a
Creative Commons Attribution 3.0 Unported License.
This example builds on previous examples. As in the text block example, we make the license assertion about the image. In the surrounding
div
, we place an
about
attribute. This scopes all RDFa within the
div
as having (in this case)
CC_image.png
as its subject. Thus the
rel="license"
statement is about the image URL and not about the current URL, as would be the case if we did not include the
about
attribute.
We have included some new metadata in this example as well. Each property has the image file as its subject due having specified
about="CC_image.png"
property="dct:title"
within the
span
element makes the assertion that the image file has a
dct:title
of
Sharing Creative Works
. Note that the title is an RDFa literal, meaning the object of the
dct:title
property is whatever falls within the
span
tag. Therefore, be careful not to include line breaks or other characters that you don't want to be a part of your assertion.
rel="cc:attributionURL dct:creator"
is a compound
rel
attribute. Rather than using two separate
rel
attributes, we are able to place two attribute values within a single
rel
by separating the properties with a space. The
rel
attribute always has the
href
attribute as its object, which in this case is the URL to the Creative Commons main page,
Video
HTML5 video with one source tag and metadata
↳ See example HTML
Explanation
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/">
href="https://creativecommons.org/videos/a-shared-culture"
property="dct:title"
rel="cc:attributionURL"
>A Shared Culture, by
href="https://en.wikipedia.org/wiki/Jesse_Dylan"
property="cc:attributionName"
rel="dct:creator"
>Jesse Dylan,
is licensed under a
Creative Commons Attribution NonCommercial ShareAlike License.
Embedding CC REL metadata in an HTML5
video
tag with a single
source
tag is straightforward. The technique is similar to embedding metadata about an image. An
about
attribute is used in a surrounding
div
to set the subject of all triples in the
div
to the URL of the video linked to by the
source
tag.
Below the video, we've included a fairly standard CC license mark. As per the instruction on the video's official page, we have linked to the video page and attributed the video to its creator. Additionally, we have indicated the creator of the video with
dct:creator
with the object as Jesse Dylan's Wikipedia page. The text within that link is also used as a literal to set the object of
cc:attributionName
Jesse Dylan
HTML5 video with multiple source tags (EXPERIMENTAL)
↳ See example HTML
Explanation
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/">
property="dct:title"
rel="cc:attributionURL">A Shared Culture, by
property="cc:attributionName"
rel="dct:creator">Jesse Dylan,
is licensed under a
Creative Commons Attribution NonCommercial ShareAlike License.
property="dct:title"
content="A Shared Culture"
style="display:none;"
rel="dct:creator"
href="https://en.wikipedia.org/wiki/Jesse_Dylan"
content="Jesse Dylan"
href="https://creativecommons.org/videos/a-shared-culture">
href="https://creativecommons.org/licenses/by-nc-sa/3.0/">
property="dct:title"
content="A Shared Culture"
style="display:none;">
rel="dct:creator"
href="https://en.wikipedia.org/wiki/Jesse_Dylan"
content="Jesse Dylan">
href="https://creativecommons.org/videos/a-shared-culture">
href="https://creativecommons.org/licenses/by-nc-sa/3.0/">
For HTML5 videos with multiple
source
tags, our markup is more complicated. Depending on a user's browser, a different video could be displayed when they visit the page. Each version of the video has equivalent content but a different URL. In this example, we have
.web
.mp4
, and
.ogv
videos. Thus, to accommodate this fact, we make several sets of assertions, each identical but with a different subject.
In our example, we make one visible assertion about the first
source
URL, the
webm
video. The whole example is contained in a single
div
with the
about
attribute set to the URL to the
webm
video. The license metadata, not being re-scoped in any way, then has the subject of the
webm
video. Then, below the standard license assertion, we have two
div
elements, each hidden from view with a
display:none;
CSS rule. They are each scoped to a different video URL than the container
div
. Within both hidden
div
tags are the
dct:title
attributes. Rather than setting the object of
property="dct:title"
with content between the
span
tags, we use the
content
attribute to set the object of
dct:title
to
A Shared Culture
, the title of the video.
Within that hidden
div
are three
span
tags that sets first both the
dct:creator
property and the
cc:attributionName
property, the
cc:attributionURL
property, and the
rel="license"
attribute. These three
span
tags are empty, so for the properties that take literals, i.e.
property="cc:attributionName"
, we set the object of the property with a
content
attribute. In this example, we set the object of
property="cc:attributionName"
to
Jesse Dylan
with
content="Jesse Dylan"
We duplicate the hidden
div
tag but with a different
about
attribute to make the same assertions about all three formats of the same video.
Non-HTML5 video
↳ See example HTML
Explanation
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/">
rel="cc:attributionURL"
href="https://creativecommons.org/videos/a-shared-culture">A Shared Culture, by
property="cc:attributionName"
rel="dct:creator">Jesse Dylan,
is licensed under a
Creative Commons Attribution NonCommercial ShareAlike License.
Providing CC license metadata for non-HTML5 videos, typically embedded as Flash objects, is similar to our image example, or the single-source HTML5 example. We have a single URL to the video, which we set as the subject of our statements with an
about
attribute in the surrounding
div
. The URL is the same URL in the
embed
tag's
src
attribute.
Datasets
CC BY dataset, with license and attribution metadata
↳ See example HTML
Explanation
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/">
Download Example Dataset
Example Dataset
was published by
property="cc:attributionName"
rel="cc:attributionURL dct:publisher"
>Creative Commons
and is licensed under a
Creative Commons Attribution License.
Providing CC license data about a downloadable dataset is as easy as marking up an image or block of text. For datasets that have a URL, you can simply scope your statements with an
about
attribute so that your metadata has the subject of your dataset's URL.
In this example, we set
about="example_dataset.csv"
so that the subsequent metadata is about the actual dataset.
One thing to note is that here we've used a compound
rel
attribute with
rel="cc:attributionURL dct:publisher"
to set both the
cc:attributionURL
and
dct:publisher
with the same
href
attribute.
CC0 dataset, with license and attribution metadata
↳ See example HTML
Explanation
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
Download Example Dataset
x
href="https://creativecommons.org/publicdomain/zero/1.0/"
style="border-style: none;" alt="CC0"/>To the extent possible under law,
rel="dct:publisher"
href="https://creativecommons.org/">
Creative Commons
has waived all copyright and related or neighboring rights to
Example Dataset
and expects that users will follow the
rel="cc:useGuidelines"
href=""
Creative Commons Example Use Guidelines.
This work is published from the
property="vcard:Country"
datatype="dct:ISO3166"
content="US"
about="https://creativecommons.org/"
>United States.
One can mark a downloadable dataset as having been placed in the public domain with the CC0 waiver. You can create valid CC0 markup using the
CC0 tool
As with the previous example, we set the subject of our metadata with an
about
attribute, setting it to the dataset file (in this case
example_dataset.csv
). We must also declare the
vcard
namespace, as it allows us to make statements about the country of the publisher, which is important information for public domain content.
We can use
rel="license"
to indicate that copyright has been licensed (or in this case, waived) using the CC0 waiver (by setting the
href
attribute to the URL of the waiver,
Additionally, we must set a
dct:publisher
for the dataset. This will tell us who is publishing it, and will allow us to determine the relevant jurisdiction for the dataset's copyright status. In this example, the publisher is set to
. At the end of the example, you'll see that we've indicated
has
vcard:country
with
content="US"
. While one could use the content between the
span
elements as the literal value for
vcard:Country
, the CC0 and Public Domain Mark deeds require a literal value with a
datatype="ISO3166"
. That is, you don't need to specify a
content
attribute if your literal value is already has that datatype (if
US
was between the span, rather than
United States
, for example). We additionally indicate that this data,
content="US"
has
datatype="dct:ISO3166"
Lastly, we've indicated Use Guidelines to this work by using the
cc:useGuidelines
predicate in a
rel
attribute. In this example, the object
href
is empty because we have not created an example use guidelines document, but in practice this link would point to actual use guidelines for the work. For more information, see this
CC wiki page
. Please note that use guidelines are not legally binding, and
cc:useGuidelines
is not meant to specify a URL that indicates legally binding guidelines for the work.
Public Domain Mark on the CC wiki
Multiple CC Licenses on a Page
Multiple CC objects: Text and Image
↳ See example HTML
Explanation


Sharing Creative Works,
by property="cc:attributionName"
rel="cc:attributionURL dct:creator">Creative Commons
is licensed under a
Creative Commons Attribution 3.0 Unported License.

This page, by
property="cc:attributionName"
href="https://creativecommons.org/foobar">Foo Bar,
is licensed under a
Creative Commons Attribution-ShareAlike 3.0 Unported License.
We have already seen the strategy for including metadata about different objects on a page in the
text block
and other examples. The general idea is to set different subjects for different sets of metadata with an
about
attribute in a surrounding element, like a
div
. In this example, we have two different license assertions. One assertion is made about the whole document, and one is made about the
CC_image.png
image. The license assertion about the page follows the standard
attribution
example. All metadata is about the current document because no
about
attribute is set to scope the statements. Then, above that metadata, we have a
div
that sets the subject
CC_image.png
with an
about
attribute. Within that
div
is license metadata about the license applied to that image.
There are two license assertions in this example. One is about the example as a whole, and one about the image within the example. If you were to click the license deeds from the example, the CC license deed would see and display metadata from that work on the page and in the copy-and-paste attribution HTML. This is because the license assertions are made about different licenses; for the resource as a whole, CC BY-SA, and for the image, CC BY. Unfortunately, if both license assertions were the same, the CC license deed would not be able to determine which metadata to display and would therefore display none.
RDFa Primer: Multiple Items per Page
Attributing Reuses
Attributing a single-source remix
↳ See example HTML
Explanation

Este remix del
href="attribution.html"
rel="dct:source"
property="dct:title"
>Attribution Example
de
about="attribution.html"
href="http://lessig.org/"
rel="dct:creator">
property="dct:title"
>Lawrence Lessig,
es por
rel="cc:attributionURL"
href="https://creativecommons.org/">Creative Commons
y está disponible bajo una licencia
Creative Commons Attribution 3.0 Unported.
Attributing a source work in a remix is similar to how you would attribute a CC license work in a use, with one addition: you indicate a source work for the current document using
dct:source
. In this example, we have a Spanish version of an earlier example. The original document is indicated as the source of the current URL by linking to the source,
href="attribution.html"
, and specifying
rel="dct:source"
. The title of the source document is set in the
span
within the link. Here it's important to note that
dct:title
is describing the object of the surrounding tag; in this case,
attribution.html
. We also properly attribute the original document with the correct
cc:attributionURL
and
cc:attributionName
specified by the source. Lastly, we set a new
cc:attributionURL
and
cc:attributionName
for the remixed work.
Attributing a multiple-source remix
↳ See example HTML
Explanation
xmlns:cc="http://creativecommons.org/ns#">

Sharing Creative Works,
by
property="cc:attributionName"
rel="cc:attributionURL dct:creator">Creative Commons
is licensed under a
Creative Commons Attribution 3.0 Unported License.
Este remix de
href="attribution.html"
rel="dct:source"
Attribution Example,
de
rel="dct:creator"
href="http://lessig.org/">Lawrence Lessig,
y href="image.html"
rel="dct:source"
Image Example, por
rel="dct:creator"
href="https://creativecommons.org/">Creative Commons,
fue creado por
rel="cc:attributionURL"
href="https://creativecommons.org/">Creative Commons
y está disponible bajo una
Creative Commons Attribution 3.0 Unported License.
To attribute multiple sources in a remixed document, you simply need to indicate multiple
dct:source
documents. In this example, we have a document that is a remix of two source documents. Both source documents have been marked as being a
dct:source
. Additionally, the source documents are properly attributed and linked to as prescribed within each.
Public Domain Content
CC0
Marking waiver, publisher, and use guidelines
↳ See example HTML
Explanation
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
style="border-style: none;" alt="CC0"/>To the extent possible under law,
rel="dct:publisher"
href="https://creativecommons.org/">
Creative Commons
has waived all copyright and related or neighboring rights to
Example Work
and expects that users will follow the
rel="cc:useGuidelines"
href=""
Creative Commons Example Use Guidelines.
This work is published from the
property="vcard:Country"
datatype="dct:ISO3166"
content="US"
about="https://creativecommons.org/"
>United States.
To mark a work as having been placed into the public domain with the CC0 waiver, one follows similar steps from previous examples. If you'd like to avoid manually embedding metadata, You can create valid CC0 markup using the
CC0 tool
The link to the CC0 waiver should include a
rel="license"
attribute, even though the CC0 waiver is not a license, legally speaking. The
dct:publisher
should be set to the identifying URL of the publishing entity.
As in our dataset example, you should register the
vcard
namespace in the CC0 waiver mark. This enables the
vcard:Country
property, as seen at the bottom of this example. As in the datset example, we make a
vcard:Country
assertion about the
dct:publisher
. In this case, that publisher is
. For the
vcard:Country
value, we override the literal
United States
between the
span
tags by providing a
content
attribute, set to
US
. We additionally specify the datatype for this
content
attribute with
datatype="dct:ISO3166"
. While one could use the content between the
span
elements as the literal value for
vcard:Country
, the CC0 and Public Domain Mark deeds require a literal value with a
datatype="ISO3166"
. That is, you don't need to specify a
content
attribute if your literal value is already has that datatype (if
US
was between the span, rather than
United States
, for example).
As in previous examples, we have the option of linking to Use Guidelines for the work. To indicate that a link is to Use Guidelines we include a
rel="cc:useGuidelines"
attribute in the link. If this metadata is included, when someone clicks on the PDM mark the deed should discover that metadata and link to the guideline URL. In this example the
href
attribute is empty but would normally include the location of any use guidelines. Please note that use guidelines are not legally binding, and
cc:useGuidelines
is not meant to specify a URL that indicates legally binding guidelines for the work.
Public Domain Mark
Marking license, publisher, and use guidelines
↳ See example HTML
Explanation
xmlns:dct="http://purl.org/dc/terms/">

style="border-style: none;" alt="Public Domain Mark" />This work (Mona Lisa,
by href="https://en.wikipedia.org/wiki/Leonardo_da_Vinci"
rel="dct:creator"
Leonardo di ser Piero da Vinci
),
identified by
rel="dct:publisher"
>property="dct:title"
>Nathan Yergler,
is free of known copyright restrictions. Users are requested to honor the non-binding
href=""
rel="cc:useGuidelines"
>use guidelines.
Using the Public Domain Mark is very similar to using the CC0 waiver. First we set the subject of our metadata to the content being identified. In this case, we set
about="Mona_Lisa.jpeg"
. We then set a
rel="license"
attribute in the link to the PDM mark, again even though the mark is not strictly a license. We can also identify a creator of the work; in this case, the
dct:creator
is
Leonardo di ser Piero da Vinci
, which is a literal
dct:title
value applied to the URL
, identifying the creator.
It is important we identify a
dct:publisher
of the resource, which is the entity making the Public Domain identification. The object of
dct:publisher
is a URL set with an
href
which is then given a
dct:title
. In this case, the
dct:publisher
is
which has the title
Nathan Yergler
As in previous examples, we have the option of linking to Use Guidelines for the work. To indicate that a link is to Use Guidelines we include a
rel="cc:useGuidelines"
attribute in the link. If this metadata is included, when someone clicks on the PDM mark the deed should discover that metadata and link to the guideline URL. In this example the
href
attribute is empty but would normally include the location of any use guidelines. Please note that use guidelines are not legally binding, and
cc:useGuidelines
is not meant to specify a URL that indicates legally binding guidelines for the work.
Public Domain Mark on the CC wiki
Marking copyright registration
There is a method to mark your CC-licensed work as being registered by a copyright registry.
Marking a work as registered (CC Network)
↳ See example HTML
Explanation
xmlns:sioc="http://rdfs.org/sioc/ns#"
rel="sioc:has_owner"
href="https://creativecommons.net/creativecommons/"
style="border:0;" />property="dct:title">Example Work
by
href="https://creativecommons.org/"
property="cc:attributionName"
rel="cc:attributionURL">Creative Commons
is licensed under a
Creative Commons Attribution 3.0 Unported License.
Registering work on the CC Network is a multi-step process. First, you must have an account on the CC Network. For more details on obtaining one, see
creativecommons.net
. Then you must find the stable URL to your work and follow the directions on the CC Network to registering it as your work. In your CC Network account, you should be given a copy-and-paste version of the CC Network badge to place on the work.
In this example, you can see the CC Network badge with the embedded registration metadata. First the
sioc
namespace is declared. Then we link the badge to our CC Network account with a
rel="sioc:has_owner"
to indicate that this is a link to the owner of the current document.
With this metadata in place, when someone clicks through to the license deed from the work, the deed will display registration information and link to the registration page on the CC Network.
Describing Work Registrations
describes how a Registry and creator (Registrant) can publish information about Work Registrations in a decentralized, mutually reinforcing and extensible manner.
More Resources
W3C Member Submission: ccREL: The Creative Commons Rights Expression Language
CC REL page on the CC wiki
RDFa Primer
RDFa in XHTML: Syntax and Processing
RDFa Wiki
Implementing Creative Commons License Metadata
is produced and maintained by
Creative Commons
and is licensed under a
Creative Commons Attribution License
. The source is available
here