Skip to content

Instantly share code, notes, and snippets.

@KurtWM
Last active December 11, 2015 02:28
Show Gist options
  • Save KurtWM/4530687 to your computer and use it in GitHub Desktop.
Save KurtWM/4530687 to your computer and use it in GitHub Desktop.
An example of Rich Snippet, taken from Google Webmaster Tools (https://support.google.com/webmasters/bin/answer.py?hl=en&answer=164506) Here's how this sample works: On the first line, <itemscope itemtype="http://data-vocabulary.org/Event"> indicates that the HTML enclosed in the <div> represents an Event. itemscope indicates that the content of…
<div itemscope itemtype="http://data-vocabulary.org/Event">
​<a href="http://www.example.com/events/spinaltap" itemprop="url" >
<span itemprop="summary">Spinal Tap</span>
</a>
<img itemprop="photo" src="spinal_tap.jpg" />
<span itemprop="description">After their highly-publicized search for a new drummer,
Spinal Tap kicks off their latest comeback tour with a San
Francisco show.</span>
When:
<time itemprop="startDate" datetime="2015-10-15T19:00-08:00">Oct 15, 7:00PM</time>—
<time itemprop="endDate" datetime="2015-10-15T19:00-08:00">Oct 15, 9:00PM</time>
Where:
​<span itemprop="location" itemscope itemtype="http://data-vocabulary.org/​Organization">
​<span itemprop="name">Warfield Theatre</span>
​<span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">
<span itemprop="street-address">982 Market St</span>,
<span itemprop="locality">San Francisco</span>,
<span itemprop="region">CA</span>
</span>
<span itemprop="geo" itemscope itemtype="http://data-vocabulary.org/​Geo">
<meta itemprop="latitude" content="37.774929" />
<meta itemprop="longitude" content="-122.419416" />
</span>
</span>
Category: <span itemprop="eventType">Concert</span>
<span itemprop="ticketAggregate" itemscope itemtype="http://data-vocabulary.org/Offer-aggregate">
Tickets from $<span itemprop="lowPrice">10.00</span>-$<span itemprop="highPrice">11.00</span>
<span itemprop="currency" content="USD" />
<span itemprop="offerCount">2,000</span> tickets available
<a href="http://www.example.com/events/spinaltap/alltickets" itemprop="offerurl">
http://google.com/ticket</span>See all available tickets</a>
</span>
<span itemprop="tickets" itemscope itemtype="http://data-vocabulary.org/Offer">
<a href="http://www.example.com/events/spinaltap/presale" itemprop="offerurl">Presale tickets</a>
<span itemprop="price">$10</span><span itemprop="currency" content="USD" />
till <time itemprop="priceValidUntil" datetime="2015-11-10">10 November 2015</time>
(<span itemprop="quantity">1000</span> available)
</span>
<span itemprop="tickets" itemscope itemtype="http://data-vocabulary.org/Offer">
<a href="http://www.example.com/events/spinaltap/tickets" itemprop="offerurl">Full-price tickets</a>
<span itemprop="price">$11</span><span itemprop="currency" content="USD" />
</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment