SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Microdata 
for 
Dummies 
Use Semantic Annotations 
in Web Pages
Why to use Semantic Annotations? 
• to annotate HTML content with specific machine-readable 
labels 
• to allow generic scripts to provide custom services to 
the page 
• to enable content from many sources to be processed 
by a single script in a consistent manner.
“specific machine-readable labels”? 
• Indeed you have to use „labels“ from a specific vocabulary, 
e.g. Schema.org 
• Schema.org is endorsed by Google, Bing and Yahoo! 
• This presentation does not discuss Schema.org 
vocabulary but use it 
• Check http://getschema.org for many other examples.
How to use these „labels“? (1) 
<h1>Pita Pizza</h1> 
<p>By Mindy Pretner</p> 
This is my HTML, 
Pita Pizza is a quick snack or meal that can be customized to your liking! 
what should I do 
<h2>1 Serving Piece</h2> 
<p> Prep Time: 5 Min<br/> Cook Time: 15 Min<br/> Ready In: 20 Min</now? 
p> 
<h3> Ingredients</h3> 
<ul> 
<li>1 pita bread round</li> 
<li>5 ml olive oil</li> 
<li>45 ml pizza sauce</li> 
<li>55 g shredded mozzarella cheese</li> 
<li>25 g sliced crimini mushrooms</li> 
<li>0.7 g garlic salt</li> 
</ul> 
<h3> How to do it</h3> 
<ol> 
<li>Preheat grill for medium-high heat.</li> 
<li>Spread one side of the pita with olive oil and pizza sauce. Top with cheese and mushrooms, and season with garlic 
salt.</li> 
<li>Lightly oil grill grate. Place pita pizza on grill, cover, and cook until cheese completely melts, about 5 minutes.</li> 
</ol> 
<h3> Nutritional Information </h3> 
<p> <strong>Amount Per Serving</strong> 
Calories: 405 | Total Fat: 18g | Cholesterol: 44mg 
</p> 
Well, you have to 
tell Google that you 
published a Recipe
I want to publish a recipe 
<div itemscope itemtype="http://schema.org/Recipe"> 
<h1>Pita Pizza</h1> 
… 
</div> 
Use a container element (such as <div>) to 
describe that all enclosed content is about the same 
thing 
itemscope? itemtype? – indeed, they are some 
new attributes you need to use... This is 
Microdata. 
What about http://schema.org/Recipe ? 
This is the thing your content is about :)
Microdata (1) – what it is? 
• Microdata is a collection of HTML5 attributes helping 
us to describe items (such as a Recipe) and their 
properties (such as cooking time) 
• An item is a group of property-value pairs (Oh, that‘s 
why I need a container. Before I just defined a Recipe 
item...) 
• To create an item you MUST use the itemscope attribute 
• Each item should have a type defined with the 
itemtype attribute
Microdata (2) – itemscope, itemtype 
• Usually HTML attributes have a value.. . What about this 
itemscope ? 
• Well, in HTML5 attributes no longer require a value. 
Therefore use itemscope without any value. 
• How to I know the value of the itemtype attribute? 
• This value is a special name (technically called URI – 
Uniform Resource Identifier ) which identifies and uniformly 
what is about your content. 
• The value http://schema.org/Recipe is defined by 
Schema.org vocabulary. This is the vocabulary processed by 
Google, Bing and Yahoo!. Check http://getschema.org for 
examples. 
• itemtype MUST come always together with itemscope
Microdata (3) - property-value pair 
• What about these „property-value pairs“ ? 
• Suppose you want to describe that your recipe 
is for 1 serving... 
What? I did this 
in my HTML ... 
Well, you have just a plain text 
difficult to be processed by 
machines... They would need 
to understand the human 
language, even ALL languages 
in the world...
<div> 
<span itemprop="recipeYield">1</span> 
Serving 
</div> 
Microdata (4) - itemprop 
• Use a property-value pair to describe this 
• Microdata has the itemprop attribute („item 
property“) 
What should I do better? 
I‘ve got it! The property is recipeYield 
and the value is "1" 
So we have a property-value pair
Microdata (5) - more about itemprop 
• An itemprop can also introduce multiple properties 
at once, to avoid duplication when that properties 
have the same value. 
<p itemprop="author creator" itemscope 
itemtype="http://schema.org/Person"> 
By <a itemprop="url" 
href="http://fourstarcooks.org/mindypretner"> 
<span itemprop="name">Mindy Pretner</span> 
</a> 
</p>
More about values 
• Properties generally have values that are strings, but in 
many cases there are values that are URLs (such as the 
image of my pita pizza) , then the value of such property 
will be taken from the attribute that express it (such as src 
attribute of <img>) 
<div itemscope itemtype="http://schema.org/Recipe"> 
<h1 itemprop="name">Pita Pizza</h1> 
<img itemprop="image" 
src="http://myrecipes.com/images/pitapizza.png" 
alt="Pita Pizza"/> 
… 
</div>
There are many ways to markup (1) 
<p itemprop="author" itemscope 
itemtype="http://schema.org/Person"> 
By <a itemprop="url" 
href="http://fourstarcooks.org/mindypretner"> 
<span itemprop="name">Mindy Pretner</span> 
</a> 
</p> 
<p itemprop="author"> 
<div itemscope itemtype="http://schema.org/Person"> 
By <a itemprop="url" 
href="http://fourstarcooks.org/mindypretner"> 
<span itemprop="name">Mindy Pretner</span> 
</a> 
</div> 
</p>
There are many ways to markup (2) 
<p itemprop="author" 
itemscope itemtype="http://schema.org/Person"> 
By 
<span itemprop="name"> 
<a itemprop="url" 
href="http://fourstarcooks.org/mindypretner"> 
Mindy Pretner 
</a> 
</span> 
</p>
Can the machine understand "20 Min"? 
• Indeed, this is a long story... Some text is more easy to be 
understood some other very difficult 
• The total time of my recipe is 20 min... 
• therefore, sometimes, we need to separate the 
human readable content (20 Min) from the 
machine readable one (P20M)... 
<div itemscope itemtype="http://schema.org/Recipe"> 
... 
Ready In: 
<time itemprop="totalTime" datetime="P20M"> 
20 Min 
</time> 
... 
</div>
How to describe collections? 
<ul> 
<li itemprop="ingredient">1 pita bread 
round</li> 
<li itemprop="ingredient">5 ml olive oil</li> 
… 
</ul> 
A property may appear many times 
What about "5 ml"... This is a quantity. Is any 
way to describe it better? 
Well, there are some solutions but, if you are a 
beginner, just do as above
Properties have "expected values" 
• Schema.org properties have expected values. 
• What is an "expected value"? 
• Let's say it is the best value you can put for your 
property 
• Remember the duration of of your recipe? 
• The property totalTime has a Duration as expected 
value 
• A Duration is a precise string using ISO 8601 duration 
format 
• When such a format is not provided the machine may 
fail to understand the value
Referring items 
• How I can refer an item which is not in the same container? 
• You have to uss a combination between HTML attribute id and 
attribute itemref sharing the SAME value 
• Then you can still annotate when the data to be annotated does 
not follow the convenient tree structure... 
<div itemprop="author" id="x"> 
<div itemscope itemtype="http://schema.org/Person> 
<p itemprop="author">Friedrich Hayek</p> 
</div> 
</div> 
<div itemscope itemtype="http://schema.org/Book" itemref="x"> 
<p itemprop="title">The Road to Serfdom</p> 
</div>
Vocabularies define types 
• How do I know what type (itemtype) to use? 
• Microdata do NOT define these types and their 
properties 
• Types and properties are part of Web vocabularies, e.g., 
Schema.org 
• Example of types: 
o http://schema.org/Recipe 
o http://schema.org/Book 
• Each type defines its own properties and inherits 
properties from its super types e.g., 
• http://schema.org/CreativeWork is a supertype (or 
parent/ancestor type) of http://schema.org/Diet therefore 
Diet inherits all CreativeWork properties 
• Diet is a subtype of CreativeWork
Which vocabulary should I use? 
• Fact is that, according with the semantics you want to 
encode there are plenty of Web vocabularies: FOAF, 
SKOS, DOAP, ... 
• However, these types and properties should be 
understood by Web applications... 
• Therefore when you use e.g., SKOS then ONLY 
applications that process SKOS will interact with your 
page 
• Remember, Google, Bing and Yahoo! Allied to process 
a common vocabulary, Schema.org 
See examples at 
http://getschema.org
Happy? 
• Visit http://getschema.org to learn more 
• Request an account if you like to contribute 
• Follow us

Weitere ähnliche Inhalte

Andere mochten auch

Snurra flaskan i vinkunskap
Snurra flaskan i vinkunskapSnurra flaskan i vinkunskap
Snurra flaskan i vinkunskapOliwer06
 
March of Dimes - Tennessee Chapter's Investment Allocation
March of Dimes - Tennessee Chapter's Investment AllocationMarch of Dimes - Tennessee Chapter's Investment Allocation
March of Dimes - Tennessee Chapter's Investment AllocationAllison Haley Luffman
 
CARA KERJA MESIN ATM
CARA KERJA MESIN ATMCARA KERJA MESIN ATM
CARA KERJA MESIN ATMMarinah_KS
 
Sistem pengolahan dataa
Sistem pengolahan dataaSistem pengolahan dataa
Sistem pengolahan dataaMarinah_KS
 
Here we go! 小紅人伸展操
Here we go! 小紅人伸展操Here we go! 小紅人伸展操
Here we go! 小紅人伸展操吳姿 吳
 
Mkt 450 week 3 research method
Mkt 450 week 3 research methodMkt 450 week 3 research method
Mkt 450 week 3 research methodfortingprocex1982
 
低頭族導引手機套
低頭族導引手機套低頭族導引手機套
低頭族導引手機套吳姿 吳
 

Andere mochten auch (9)

Snurra flaskan i vinkunskap
Snurra flaskan i vinkunskapSnurra flaskan i vinkunskap
Snurra flaskan i vinkunskap
 
March of Dimes - Tennessee Chapter's Investment Allocation
March of Dimes - Tennessee Chapter's Investment AllocationMarch of Dimes - Tennessee Chapter's Investment Allocation
March of Dimes - Tennessee Chapter's Investment Allocation
 
CARA KERJA MESIN ATM
CARA KERJA MESIN ATMCARA KERJA MESIN ATM
CARA KERJA MESIN ATM
 
Sistem pengolahan dataa
Sistem pengolahan dataaSistem pengolahan dataa
Sistem pengolahan dataa
 
Here we go! 小紅人伸展操
Here we go! 小紅人伸展操Here we go! 小紅人伸展操
Here we go! 小紅人伸展操
 
Mkt 450 week 3 research method
Mkt 450 week 3 research methodMkt 450 week 3 research method
Mkt 450 week 3 research method
 
Dust devils
Dust devilsDust devils
Dust devils
 
低頭族導引手機套
低頭族導引手機套低頭族導引手機套
低頭族導引手機套
 
Model Drivers
Model DriversModel Drivers
Model Drivers
 

Ähnlich wie Microdata for dummies

Microdata for Dummies
Microdata for DummiesMicrodata for Dummies
Microdata for Dummiesgiurca
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata  & Google Rich SnippetsIntroduction to Microdata  & Google Rich Snippets
Introduction to Microdata & Google Rich SnippetsKishan Gor
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoFu Cheng
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
Getting the most out of Radiant
Getting the most out of RadiantGetting the most out of Radiant
Getting the most out of Radiantjomz83
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bagstuplum
 
Getting to know perch — and perch runway!
Getting to know perch — and perch runway!Getting to know perch — and perch runway!
Getting to know perch — and perch runway!Abigail Larsen
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownMark Rackley
 
Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Jim McKeeth
 
Hacking the Google Snippet - Digpen 7 workshop
Hacking the Google Snippet - Digpen 7 workshopHacking the Google Snippet - Digpen 7 workshop
Hacking the Google Snippet - Digpen 7 workshopIan Macfarlane
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 
HTML Semantic Tags
HTML Semantic TagsHTML Semantic Tags
HTML Semantic TagsBruce Kyle
 
Google Tag Manager - Basic Introduction
Google Tag Manager - Basic IntroductionGoogle Tag Manager - Basic Introduction
Google Tag Manager - Basic Introductioncarlfranzon
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy stepsprince Loffar
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standardsJustin Avery
 
Light introduction to HTML
Light introduction to HTMLLight introduction to HTML
Light introduction to HTMLabidibo Contini
 
Microformats I: What & Why
Microformats I: What & WhyMicroformats I: What & Why
Microformats I: What & WhyRachael L Moore
 

Ähnlich wie Microdata for dummies (20)

Microdata for Dummies
Microdata for DummiesMicrodata for Dummies
Microdata for Dummies
 
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata  & Google Rich SnippetsIntroduction to Microdata  & Google Rich Snippets
Introduction to Microdata & Google Rich Snippets
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
Introduction to Microdata & Google Rich Snippets
Introduction to Microdata  & Google Rich SnippetsIntroduction to Microdata  & Google Rich Snippets
Introduction to Microdata & Google Rich Snippets
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojo
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Getting the most out of Radiant
Getting the most out of RadiantGetting the most out of Radiant
Getting the most out of Radiant
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
Getting to know perch — and perch runway!
Getting to know perch — and perch runway!Getting to know perch — and perch runway!
Getting to know perch — and perch runway!
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
 
Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!Hacking iBooks and ePub3 with JavaScript!
Hacking iBooks and ePub3 with JavaScript!
 
Hacking the Google Snippet - Digpen 7 workshop
Hacking the Google Snippet - Digpen 7 workshopHacking the Google Snippet - Digpen 7 workshop
Hacking the Google Snippet - Digpen 7 workshop
 
Django Overview
Django OverviewDjango Overview
Django Overview
 
HTML Semantic Tags
HTML Semantic TagsHTML Semantic Tags
HTML Semantic Tags
 
Google Tag Manager - Basic Introduction
Google Tag Manager - Basic IntroductionGoogle Tag Manager - Basic Introduction
Google Tag Manager - Basic Introduction
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy steps
 
Automation in Drupal
Automation in DrupalAutomation in Drupal
Automation in Drupal
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standards
 
Light introduction to HTML
Light introduction to HTMLLight introduction to HTML
Light introduction to HTML
 
Microformats I: What & Why
Microformats I: What & WhyMicroformats I: What & Why
Microformats I: What & Why
 

Kürzlich hochgeladen

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Intellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxIntellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxBipin Adhikari
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 

Kürzlich hochgeladen (20)

定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Intellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxIntellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptx
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 

Microdata for dummies

  • 1. Microdata for Dummies Use Semantic Annotations in Web Pages
  • 2. Why to use Semantic Annotations? • to annotate HTML content with specific machine-readable labels • to allow generic scripts to provide custom services to the page • to enable content from many sources to be processed by a single script in a consistent manner.
  • 3. “specific machine-readable labels”? • Indeed you have to use „labels“ from a specific vocabulary, e.g. Schema.org • Schema.org is endorsed by Google, Bing and Yahoo! • This presentation does not discuss Schema.org vocabulary but use it • Check http://getschema.org for many other examples.
  • 4. How to use these „labels“? (1) <h1>Pita Pizza</h1> <p>By Mindy Pretner</p> This is my HTML, Pita Pizza is a quick snack or meal that can be customized to your liking! what should I do <h2>1 Serving Piece</h2> <p> Prep Time: 5 Min<br/> Cook Time: 15 Min<br/> Ready In: 20 Min</now? p> <h3> Ingredients</h3> <ul> <li>1 pita bread round</li> <li>5 ml olive oil</li> <li>45 ml pizza sauce</li> <li>55 g shredded mozzarella cheese</li> <li>25 g sliced crimini mushrooms</li> <li>0.7 g garlic salt</li> </ul> <h3> How to do it</h3> <ol> <li>Preheat grill for medium-high heat.</li> <li>Spread one side of the pita with olive oil and pizza sauce. Top with cheese and mushrooms, and season with garlic salt.</li> <li>Lightly oil grill grate. Place pita pizza on grill, cover, and cook until cheese completely melts, about 5 minutes.</li> </ol> <h3> Nutritional Information </h3> <p> <strong>Amount Per Serving</strong> Calories: 405 | Total Fat: 18g | Cholesterol: 44mg </p> Well, you have to tell Google that you published a Recipe
  • 5. I want to publish a recipe <div itemscope itemtype="http://schema.org/Recipe"> <h1>Pita Pizza</h1> … </div> Use a container element (such as <div>) to describe that all enclosed content is about the same thing itemscope? itemtype? – indeed, they are some new attributes you need to use... This is Microdata. What about http://schema.org/Recipe ? This is the thing your content is about :)
  • 6. Microdata (1) – what it is? • Microdata is a collection of HTML5 attributes helping us to describe items (such as a Recipe) and their properties (such as cooking time) • An item is a group of property-value pairs (Oh, that‘s why I need a container. Before I just defined a Recipe item...) • To create an item you MUST use the itemscope attribute • Each item should have a type defined with the itemtype attribute
  • 7. Microdata (2) – itemscope, itemtype • Usually HTML attributes have a value.. . What about this itemscope ? • Well, in HTML5 attributes no longer require a value. Therefore use itemscope without any value. • How to I know the value of the itemtype attribute? • This value is a special name (technically called URI – Uniform Resource Identifier ) which identifies and uniformly what is about your content. • The value http://schema.org/Recipe is defined by Schema.org vocabulary. This is the vocabulary processed by Google, Bing and Yahoo!. Check http://getschema.org for examples. • itemtype MUST come always together with itemscope
  • 8. Microdata (3) - property-value pair • What about these „property-value pairs“ ? • Suppose you want to describe that your recipe is for 1 serving... What? I did this in my HTML ... Well, you have just a plain text difficult to be processed by machines... They would need to understand the human language, even ALL languages in the world...
  • 9. <div> <span itemprop="recipeYield">1</span> Serving </div> Microdata (4) - itemprop • Use a property-value pair to describe this • Microdata has the itemprop attribute („item property“) What should I do better? I‘ve got it! The property is recipeYield and the value is "1" So we have a property-value pair
  • 10. Microdata (5) - more about itemprop • An itemprop can also introduce multiple properties at once, to avoid duplication when that properties have the same value. <p itemprop="author creator" itemscope itemtype="http://schema.org/Person"> By <a itemprop="url" href="http://fourstarcooks.org/mindypretner"> <span itemprop="name">Mindy Pretner</span> </a> </p>
  • 11. More about values • Properties generally have values that are strings, but in many cases there are values that are URLs (such as the image of my pita pizza) , then the value of such property will be taken from the attribute that express it (such as src attribute of <img>) <div itemscope itemtype="http://schema.org/Recipe"> <h1 itemprop="name">Pita Pizza</h1> <img itemprop="image" src="http://myrecipes.com/images/pitapizza.png" alt="Pita Pizza"/> … </div>
  • 12. There are many ways to markup (1) <p itemprop="author" itemscope itemtype="http://schema.org/Person"> By <a itemprop="url" href="http://fourstarcooks.org/mindypretner"> <span itemprop="name">Mindy Pretner</span> </a> </p> <p itemprop="author"> <div itemscope itemtype="http://schema.org/Person"> By <a itemprop="url" href="http://fourstarcooks.org/mindypretner"> <span itemprop="name">Mindy Pretner</span> </a> </div> </p>
  • 13. There are many ways to markup (2) <p itemprop="author" itemscope itemtype="http://schema.org/Person"> By <span itemprop="name"> <a itemprop="url" href="http://fourstarcooks.org/mindypretner"> Mindy Pretner </a> </span> </p>
  • 14. Can the machine understand "20 Min"? • Indeed, this is a long story... Some text is more easy to be understood some other very difficult • The total time of my recipe is 20 min... • therefore, sometimes, we need to separate the human readable content (20 Min) from the machine readable one (P20M)... <div itemscope itemtype="http://schema.org/Recipe"> ... Ready In: <time itemprop="totalTime" datetime="P20M"> 20 Min </time> ... </div>
  • 15. How to describe collections? <ul> <li itemprop="ingredient">1 pita bread round</li> <li itemprop="ingredient">5 ml olive oil</li> … </ul> A property may appear many times What about "5 ml"... This is a quantity. Is any way to describe it better? Well, there are some solutions but, if you are a beginner, just do as above
  • 16. Properties have "expected values" • Schema.org properties have expected values. • What is an "expected value"? • Let's say it is the best value you can put for your property • Remember the duration of of your recipe? • The property totalTime has a Duration as expected value • A Duration is a precise string using ISO 8601 duration format • When such a format is not provided the machine may fail to understand the value
  • 17. Referring items • How I can refer an item which is not in the same container? • You have to uss a combination between HTML attribute id and attribute itemref sharing the SAME value • Then you can still annotate when the data to be annotated does not follow the convenient tree structure... <div itemprop="author" id="x"> <div itemscope itemtype="http://schema.org/Person> <p itemprop="author">Friedrich Hayek</p> </div> </div> <div itemscope itemtype="http://schema.org/Book" itemref="x"> <p itemprop="title">The Road to Serfdom</p> </div>
  • 18. Vocabularies define types • How do I know what type (itemtype) to use? • Microdata do NOT define these types and their properties • Types and properties are part of Web vocabularies, e.g., Schema.org • Example of types: o http://schema.org/Recipe o http://schema.org/Book • Each type defines its own properties and inherits properties from its super types e.g., • http://schema.org/CreativeWork is a supertype (or parent/ancestor type) of http://schema.org/Diet therefore Diet inherits all CreativeWork properties • Diet is a subtype of CreativeWork
  • 19. Which vocabulary should I use? • Fact is that, according with the semantics you want to encode there are plenty of Web vocabularies: FOAF, SKOS, DOAP, ... • However, these types and properties should be understood by Web applications... • Therefore when you use e.g., SKOS then ONLY applications that process SKOS will interact with your page • Remember, Google, Bing and Yahoo! Allied to process a common vocabulary, Schema.org See examples at http://getschema.org
  • 20. Happy? • Visit http://getschema.org to learn more • Request an account if you like to contribute • Follow us