Show Menu

RDFa Lite Cheat Sheet by

RDF in attributes, Lite edition

Basic Attributes

Defines the default vocabulary for a paragraph <p>, or the whole document <bo­dy>
<p vocab=­"­htt­p:/­/sc­hem­a.o­rg/­"> ... </p>
Designates the type of an individual within the current vocabulary
<div typeof­="Pe­rso­n"> ... </d­iv>
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

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>
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="">
<div property="breadcrumb">
  <a href="">IBM developerWorks</a> >
    <a href="">Web development</a> >
    <a href=""
        >Technical library</a>

<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>.

<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>Tags for this article: 
  <span property="keywords">introduction</span>,
  <span property="keywords">rdf</span>,
  <span property="keywords">tutorial</span>

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



No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.