Show Menu

RDFa Lite Cheat Sheet by

RDF in attributes, Lite edition
rdf     semantic     rdfa

Basic Attributes

vocab
Defines the default vocabulary for a paragraph <p>, or the whole document <bo­dy>
<p vocab=­"­htt­p:/­/sc­hem­a.o­rg/­"> ... </p>
typeof
Designates the type of an individual within the current vocabulary
<div typeof­="Pe­rso­n"> ... </d­iv>
property
Provides a property in the vocabulary for the individual (property value is a text string)
<span proper­ty=­"­nam­e">Manu Sporny­</s­pan>
property (URL)
Provides a property whose value is a URL
<a proper­ty=­"­url­" href="h­ttp­://­man­u.s­por­ny.o­rg­/">my homepa­ge<­/a>

Interm­ediate Attributes

resource
Provides a handle for unique entities in the web page
<p vocab=­"­htt­p:/­/sc­hem­a.o­rg/­" resour­ce=­"­#ma­nu" typeof­="Pe­rso­n"> ... </p>
prefix
Defines additional vocabu­laries
<p vocab=­"­htt­p:/­/sc­hem­a.o­rg/­" prefix­="ov: http:/­/op­en.v­oc­ab.o­rg­/te­rms­/" resour­ce=­"­#ma­nu" typeof­="Pe­rso­n"> ... My favorite animal is the <span proper­ty=­"­ov:­pre­fer­red­Ani­mal­"­>Li­ger­</s­pan­>. </p>

Example using all attributes

<body vocab="http://schema.org/">
...
<div property="breadcrumb">
  <a href="http://www.ibm.com/developerworks/">IBM developerWorks</a> >
    <a href="http://www.ibm.com/developerworks/web/">Web development</a> >
    <a href="http://www.ibm.com/developerworks/views/web/library.jsp"
        >Technical library</a>
</div>

<div typeof="Article">

<div property="name">An introduction to RDF</div>

<p property="author" resource="#uche.ogbuji" typeof="Person">
   by <span property="name">Uche Ogbuji</span>, <span property="jobTitle">Partner</span>,
   <span property="worksFor">Zepheira</span>.
</p>

<div>Published: <span property="datePublished">01 Dec 2000</span></div>

<div property="description">
  <b>Summary</b>: This article introduces Resource Description Framework (RDF),
  developed by the W3C for Web-based metadata, using XML as an interchange syntax.
  RDF's essential aim is to make work easier for autonomous agents,
  which would refine the Web by improving search engines and service directories.
  Author Uche Ogbuji gives an overview of RDF aspects from schemas to usage scenarios.
  The article assumes that you are already familiar with XML.
</div>

<div>Tags for this article:
  <span property="keywords">introduction</span>,
  <span property="keywords">rdf</span>,
  <span property="keywords">tutorial</span>
.</div>

<div prefix="fben: http://www.freebase.com/ns/">
  This article's texts is suitable for a wide audience, with a Fog index of
  <span property="fben:gunning_fog_index">10.2</span>.
</div>

</div>
...
</body>

Download the RDFa Lite Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/csabaveres_rdfa-lite.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.