Mobile app version of vmapp.org
Login or Join
Yeniel560

: Should I aspire to one top entity, or are a few different ok? I'm trying to markup a page. I marked up: WebPage WPHeader SiteNavigationElement Bredcrumbs MainContentOfPage

@Yeniel560

Posted in: #SchemaOrg

I'm trying to markup a page. I marked up:

WebPage
WPHeader
SiteNavigationElement
Bredcrumbs
MainContentOfPage
Article
Product1
Product2
WPFooter


The question is: Should I aspire to declare all internal entities of WebPage as "childs" of each other, or it's not necessary?

For example:

WebPage (declared as "isPart" of WebSite)
"hasPart" WPHeader
"hasPart" SiteNavigationElement
Bredcrumbs
MainContentOfPage
Article
"about" Product1
"about" Product2
"hasPart" WPFooter


In first variant validator shows every entity as "top entity", an in the second variant validator shows only one top entity WebPage, and other entities included as WebPage properties, id's, etc.

Which variant is better?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Yeniel560

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

You should of course use properties to relate items wherever it is possible.

If you have the two top-level items Person and Book, it’s not clear if or how they are related. The person could have read or written or bought or reviewed or … the book. But when you use a property (like author), you make the relation explicit.

In case of the syntaxes Microdata and RDFa, it doesn’t matter if you nest the items via HTML. Microdata/RDFa parsers will parse the data according to the specifications, and these only relate items if you use properties accordingly.
For example, the following two snippets generate the same Microdata output (= two top-level items), even though the item is nested in the first case:

<div itemscope itemtype="http://schema.org/Person">
<div itemscope itemtype="http://schema.org/Book">
</div>
</div>


<div itemscope itemtype="http://schema.org/Person">
</div>

<div itemscope itemtype="http://schema.org/Book">
</div>


It’s only appropriate not to use properties if


there is no suitable property defined, or
the items are not related somehow.

10% popularity Vote Up Vote Down


 

@Cofer257

The relationship can be inferred by the scraper using it's position on the page. If x is within the element tagged as y, then y is already considered a child of x.

If this relationship is not obvious you can attempt to declare it. It does depend on which form of markup you're using.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme