Example
Most commonly schema.org metadata is encoded in HTML pages as microdata, which adds attributes to the HTML elements of the web page. 
Figure 4 (right) is a description of a learning resource such as may appear in a catalogue listing or digital repository. The title of the resource is shown as a section heading, there is a description of the resource, an illustrative image, and information about various characteristics and relationships of the resource e.g. subject, academic level, resource type, audience, etc. (In this particular case the resource is a tutorial aimed at students, a different example might be a lesson plan aimed at teachers.) The people who created the resource are credited, and legal and technical information about its availability is provided. The HTML5 code for this page is shown below (some of the styling markup has been omitted).
The whole description is wrapped in a section tag. To indicate in a machine readable way that this section provides a description of a single item, we may insert the microdata itemscope attribute, and we may use the itemtype attribute to specify the type of the item. In order to describe this example, probably the most appropriate type from the schema.org ontology to use as the value for itemtype is WebApplication, which allows us to specify the browser requirements of the resource. If the first HTML element is
1.  <section	itemscope	 	itemtype="http://schema.org/WebApplication">
Everything enclosed in this section will be interpreted as pertaining (directly or indirectly) to the description of the same resource, descriptions of other resources may be provided elsewhere on the page.
The microdata itemprop attribute is used to indicate which properties of the item are being described by the HTML. So to indicate that the text of the heading in line 3 is the title of this resource, we add the attribute itemprop="name" to the h1 element.
3.  <h1 itemprop="name">DoItPoms: Casting</h1>
Similarly itemprop="description" can be added to the p tag on line 5.  Adding itemprop="image" to the img tag will indicate that the URL specified by the src attribute of this tag is the URL for an image of this item; adding itemprop="url" to the a tag on line 25 marks the href url as the URL of the resource. Note, this may be (as it is in this case) a URL different to that of the page that carries the description.
We may want to indicate that the resource is about Materials Science, Engineering Design and Metallurgy / Metallic Fabrication (see line 7). The relevant item property is about but there is no html tag to add itemprop="about" into. The answer is to create one by inserting span elements: there are three distinct subjects and so we need three span elements:
7.   <p><strong>Subjects:</strong> <span itemprop="about">Material Science</span>  <span itemprop="about">Engineering Design</span>  <span itemprop="about">Metallurgy / Metallic Fabrication</span>
We have text for both the name and affiliation of the Academic Consultant who contributed to this resource (see line 17), so it makes sense to provide these as properties of an embedded item. This is achieved by adding an itemscope attribute with associated itemtype="http://schema.org/Person" to an enclosing HTML element as well as the itemprop="contributor" attribute. This creates a new item for describing a person, and the names and affiliation of this person can be provided:
15.  <strong>Academic consultant:</strong>
     <span itemprop="contributor" 
           itemscope itemtype="http://schema.org/Person">
          <span itemprop="name">Noel Rutter</span> 
         (<span itemprop="affiliation">
                University of Cambridge
          </span>)
     </span><br />
Note that the same value of itemprop now occurs in two places: i.e. name on lines 3 and 34, however these will be interpreted as the names of different items since properties pertain to the item of the most immediate itemscope in which they are enclosed. Many other parts of the text may be marked up to indicate the property they describe. 
To test the result, we can use Googles Structured Data Testing Tool, which for this example shows the following information that has been extracted from the microdata (many subjects and contributors have been omitted):
Item 
type: http://schema.org/webapplication
property:	
	name: 	DoItPoms: Casting
	description: This teaching and learning package (TLP) introduces a number of important processes through which metallic items can be fabricated from molten metal. As well as detailing the practical aspects...
	about:	Material Science
	about:	Engineering Design
	about:	Metallurgy / Metallic Fabrication

	contributor:	Item 1

	url: http://www.doitpoms.ac.uk/tlplib/casting/
	fileformat: text/html
	fileformat: application/x-shockwave-flash
	datepublished: 2008-08-16
	publisher: DoItPoms Project, University of Cambridge
	copyrightholder: University of Cambridge

Item 1
type: http://schema.org/person
property:	
	name: Noel Rutter
	affiliation: University of Cambridge