RDFa with schema.org codelab: overview

By Dan Scott,

About this codelab

In this codelab, you're going to take a variety of library web pages and enhance them so that they contain structured data. You will use the schema.org vocabulary and express it via RDFa attributes.

Audience: Beginner

Prerequisites: To complete this codelab, you will need a basic familiarity with HTML. The exercises can be found in codelab.zip, with the solutions found in the rdfa_exercises subdirectory. There are frequent checkpoints through the code lab, so if you get stuck at any point, you can use the checkpoint file to resume and work through this codelab at your own pace.

Codelab sections

The codelab contains a number of different types of web pages with sample markup exercises; we highly recommend that you work through the Book codelab first, as it covers all of the basics of RDFa and schema.org, before diving into any other exercises.

  1. Book:
    1. Introducing RDFa and schema.org: This is the core exercise, introducing RDFa and schema.org. Work through this before attempting anything else.
    2. Embedded types: This exercise turns the simplest string-based property values into much richer metadata based on embedded types with their own properties.
    3. Strings to things: This exercise takes the catalogue page from a structured data silo into a page that links out to external entities.
    4. External descriptions: This exercise adds links to some of the external sources of descriptions of bibliographic works.
  2. Library holdings: This exercise builds on the Book exercises, adding the representation of holdings as Offers.
  3. Library branch information: This exercise covers how to represent branch information such as hours of operation, location, contact information, and branch relationships.
  4. Periodicals: This exercise marks up the table of contents for an online journal.
  5. Comic books: This exercise marks up a comic book as a special instance of a PublicationIssue, and introduces ways to use external vocabularies and the Role type to provide more specific information about the nature of contributions.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.