John's Semantic Technology Twine John's Semantic Technology Twine / Items

About RDFa - Webmasters/Site owners Help

Get Feed
About RDFa - Webmasters/Site owners Help
Description

RDFa

Marking up content with RDFa

The following block of HTML shows a review of a video game.

HTML

Rendered HTML in browser

Blast 'Em Up Review

by Bob Smith

March 20, 2009

This is a great game. I enjoyed it from the opening battle to the final showdown with the evil aliens.

To understand how to use RDFa, think about two concepts: entities (for example, a review) and properties of those entities (for example, the author of the review, the date of the review, the review itself, and the rating).

This is the HTML with RDFa markup:

This example contains three important properties:

. Occurs in the first line, and specifies the namespace where the vocabulary (a list of entities and their components) is specified. You can use the namespace declaration any time you are marking up pages for people, review, product, or place data. : Occurs in the first line of this HTML block, and defines entities. Since this example contains a review, the entity is of type . : Used to label the properties of an entity. In the example, there are many properties of the review that are labeled: the reviewer, date of the review ( ), the review itself ( ), and the rating ( ).

These three properties can be used in any HTML tags that open and close ( and are two common choices). To mark up content using RDFa:

Begin with a namespace declaration using

Specify the type of content that is being marked up using

Label the properties using .

Relationships between entities in RDFa

In the example below, we describe two entities: a review and a person.

HTML

Rendered HTML in browser

Blast 'Em Up Review

by Bob Smith, Senior Editor at ACME Reviews

This is a great game. I enjoyed it from the ...

Original URL

Comments

Report This

Twine is about discovering, collecting and sharing the content that interests you. Learn More

Join Twine

Stats

First Posted By

First Comment By

Forgot your password?