: Can Item Types Inherit Item Properties From Other Item Types? I'm looking to start incorporating "Structured Data", "Rich Snippets", or what ever terms may be associated with the schema.org vocabulary.
I'm looking to start incorporating "Structured Data", "Rich Snippets", or what ever terms may be associated with the schema.org vocabulary. I'm specifically interested in microdata rules.
Most of the websites I manage contain blogs. I figured that would be a great place to start implementing microdata in my HTML markup.
Before I can begin... I need to fully understand the rules of schema.org's microdata rules.
I've managed to find three applicable item types which could be used to implement into the HTML markup of my blogs.
Three possible items types to use with schema.org's microdata in HTML markup for a blog.
Blog (http://schema.org/Blog)
BlogPosting
(http://schema.org/BlogPosting)
Article (http://schema.org/Article)
1.) schema.org's microdata Item Type: "Blog".
I would assume that would be something like...
<section itemscope itemtype="http://schema.org/Blog">
<!-- blog posts listed here. -->
</section>
2.) schema.org's microdata Item Type: "BlogPosting".
I would assume that would be something like...
<section itemscope itemtype="http://schema.org/Blog">
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<!-- article contents here -->
</article>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<!-- article contents here -->
</article>
</section>
I'm confused about #2 . If you click the link for #2 (BlogPosting) and #3 (Article).
BlogPosting doesn't have any of it's own properties it seems. So What I'm wondering is, can I use the properties from other item types like: Article, CreativeWork, or Thing directly in my BlogPosting item type/scope?
Or do I have to declare a new item type/scope for CreativeWork nested within my BlogPosting item type/scope, before I can use the CreativeWork properties?
Are the properties from Article, CreativeWork, and Thing automatically inherited by BlogPosting? Can I just use any of those properties directly in my BlogPosting Item Type/scope without having to create a new Item Type/scope within the BlogPosting Item Type/scope.
More posts by @Ogunnowo487
1 Comments
Sorted by latest first Latest Oldest Best
To clarify the terminology: Microdata is a syntax. Schema.org is a vocabulary. (And such a vocabulary can be used with different syntaxes like JSON-LD, Microdata, and RDFa).
Your two example snippets are correct.
And your observation is also correct: BlogPosting doesn’t define any new properties.
[…] can I use the properties from other item types like: Article, CreativeWork, or Thing directly in my BlogPosting item type/scope?
Yes!
On the top of every Schema.org type page you’ll find a hierarchy:
Thing > CreativeWork > Article > BlogPosting
This means that every BlogPosting is also an Article, which is also an CreativeWork, which is also a Thing. Child types inherit the properties from their parent(s).
This is also reflected on each type page, as the table lists the properties you can use:
Properties from Article
[…]
Properties from CreativeWork
[…]
Properties from Thing
[…]
Note:
Some types have more than one parent. This is (currently) not stated in the hierarchy on a type page, but you can notice this in the properties table.
Some specific properties can be used although they are (currently) not listed in the properties table.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.