Skip to content

Instantly share code, notes, and snippets.

@SiGaCode
Last active July 14, 2017 17:58
Show Gist options
  • Save SiGaCode/acf7c62b11cc0d8b6b6a625c11b876d9 to your computer and use it in GitHub Desktop.
Save SiGaCode/acf7c62b11cc0d8b6b6a625c11b876d9 to your computer and use it in GitHub Desktop.
Getting started with schema.org using Microdata for business infos http://schema.org/docs/gs.html#microdata_how
<!-- Example 1, schneidet im Google validator am Besten ab -->
<p itemscope itemtype="http://schema.org/LocalBusiness">
<strong itemprop="name">ACME</strong><br />
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span itemprop="streetAddress">Hollywood Boulevard</span><br />
<span itemprop="postalCode">12345</span> <span itemprop="addressLocality">Sin City</span><br /></span>
Tel.: <span itemprop="telephone" content="+15552345567">555-2345567</span><br />
<a itemprop="email" content="[email protected]" href="/cdn-cgi/l/email-protection#aac3c4ccc5eacfd2cbc7dac6cf84c9c5c795d9dfc8c0cfc9de97ecffffffff">[email protected]</a><meta itemprop="url" content="http://www.example.com/" />
</p>
<!-- Example 2 -->
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<div itemprop="director" itemscope itemtype="http://schema.org/Person">
Director: <span itemprop="name">James Cameron</span> (born <span itemprop="birthDate">August 16, 1954</span>)
</div>
<span itemprop="genre">Science fiction</span>
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>
<!-- Example 3 from https://whitespark.ca/blog/why-your-local-business-schema-sucks-and-how-to-make-it-better/ -->
<div itemscope itemtype=”http://schema.org/LocalBusiness”>
<span itemprop=”name”>Touch Point Digital Marketing Agency</span>
<link itemprop=”url” href=”http://www.touchpointdigitalmarketing.com/”>
<img itemprop=”logo” src=”http://www.touchpointdigitalmarketing.com/images/logo.png” />
<link itemprop=”sameAs” href=”https://plus.google.com/+TouchPointDigitalMarketingAgencyNewOrleans”>
<link itemprop=”hasMap” href=”https://goo.gl/maps/Ko9vX”>
<a itemprop=”telephone” href=”tel:+15048752225″>(504) 875-2225</a>
<div itemprop=”address” itemscope itemtype=”http://schema.org/PostalAddress”>
<span itemprop=”streetAddress”>4035 Washington Ave. #100</span>
<span itemprop=”addressLocality”>New Orleans</span>
<span itemprop=”addressRegion”>LA</span>
<span itemprop=”postalCode”>70125</span>
</div>
<span itemprop=”geo” itemscope itemtype=”http://schema.org/GeoCoordinates”>
<meta itemprop=”latitude” content=”29.9516186″ />
<meta itemprop=”longitude” content=”-90.1007005″ />
</span>
</div>
<!-- Example 4 from http://searchengineland.com/schema-markup-structured-data-seo-opportunities-site-type-231077 -->
<div itemscope itemtype="http://schema.org/LocalBusiness">
<h1 itemprop="name">Elite SEM</h1>
<p itemprop="descripton">A performance-driven digital marketing agency.</p>
<p>Open: <time itemprop="openingHours" datetime="Mo-Fi 09:00-17:00">Monday-Friday 9am-5pm</time></p>
<p>Phone: <span itemprop="telephone" content="+16463502789">646-350-2789</span></p>
<address itemscope itemtype="http://schema.org/PostalAddress" itemprop="address">
<span itemprop="streetAddress">142 W 36th St, Fl 11</span>
<span itemprop="addressLocality">New York</span>,
<span itemprop="addressRegion">NY</span> <span itemprop="postalCode">10018</span>
</address>
</div>
<!-- Example 5 from http://schema.org/image -->
<div itemscope itemtype="http://schema.org/Hotel">
<h1><span itemprop="name">ACME Hotel Innsbruck</span></h1>
<img itemprop="logo" src="../media/logo.png" alt="hotel logo" />
<span itemprop="description">A beautifully located business hotel right in the
heart of the alps. Watch the sun rise over the scenic Inn valley while
enjoying your morning coffee.</span>
<img itemprop="photo" src="../media/hotel_front.png" alt="Front view of the hotel" />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment