Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Structured Data

Vincent Pickering
December 09, 2013

Structured Data

An expanded version of my structured data from Forefront Leeds. The talk was given at Hey Stac!

Vincent Pickering

December 09, 2013
Tweet

More Decks by Vincent Pickering

Other Decks in Design

Transcript

  1. STRUCTURED DATA HTML5 VINCENT PICKERING A Quick Primer On: Freelance

    UI/UX Designer ! @VIPickering VINCENT PICKERING
  2. DEFINITIONS • Creative Works • Events • Health • Organisations

    • Persons • Places • Products • Reviews No Markup, Just
  3. <h1 itemprop="name">Vincent Pickering</h1> <p> <img itemprop="photo" src="http://www.example.com/photo.jpg" alt="Portrait Image"> </p>

    <p> <a itemprop="url" href="http://vincentp.me">Blog</a> </p> defines the persons name the url belongs to the person the persons photo
  4. JUST REMEMBER itemscope - *Required* when you define a schema

    type schema type - Always in the form of: http://www.schema.org/xxx properties - In the form itemprop=“xxx”
  5. <section vocab="http://schema.org/" resource="#vincent" typeof="Person"> the vocab type defines the context

    You can reference this definition like an ID using resource property Definition type
  6. <h1 property="name">Vincent Pickering</h1> <p> <img property="photo" src="http://www.example.com/photo.jpg" alt="Portrait Image"> </p>

    <p> <a property="url" href="http://vincentp.me">Blog</a> </p> defines the persons name the url belongs to the person the persons photo
  7. JUST REMEMBER typeof - defines top level node to assign

    context vocab type - URL to your definitions properties - In the form property=“xxx” resource - shortcut reference for context
  8. Website Website { “name": "Vincent", "title": “Web Designer” } {

    “name": "Vincent", "title": “Mr” } We can see the data is probably related, but there is ambiguity Our System
  9. <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Person", "name": "John Doe",

    "jobTitle": "Graduate research assistant", "affiliation": "University of Dreams", "additionalName": "Johnny", "url": "http://www.example.com", "address": { "@type": "PostalAddress", "streetAddress": "1234 Peach Drive", "addressLocality": "Wonderland", "addressRegion": "Georgia" } } </script>
  10. <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Person", "name": "John Doe",

    "jobTitle": "Graduate research assistant", "affiliation": "University of Dreams", "additionalName": "Johnny", "url": "http://www.example.com", "address": { "@type": "PostalAddress", "streetAddress": "1234 Peach Drive", "addressLocality": "Wonderland", "addressRegion": "Georgia" } } </script> You need to add context and type declare as ld+json
  11. EMBED DATA IN HTML <script type="application/ld+json"> { "@context": "http://json-ld.org/contexts/person.jsonld", "@id":

    "http://dbpedia.org/resource/John_Lennon", "name": "John Lennon", "born": "1940-10-09", "spouse": "http://dbpedia.org/resource/Cynthia_Lennon" } </script>
  12. EMBED DATA IN HTML <script type="application/ld+json"> { "@context": "http://json-ld.org/contexts/person.jsonld", "@id":

    "http://dbpedia.org/resource/John_Lennon", "name": "John Lennon", "born": "1940-10-09", "spouse": "http://dbpedia.org/resource/Cynthia_Lennon" } </script> You need to add context to the email
  13. SUM UP To Microdata Search Engines RDFa Human markup context

    JSON-LD Machine markup context schema.org Vocab Type Microformats Humans