Mobile app version of vmapp.org
Login or Join
Heady270

: Can I start a Microdata after and end the same just before ? I want to use itemscope Website. Can I start it just after <head> and end it just before </body>? For Website itemscope,

@Heady270

Posted in: #Microdata #SchemaOrg

I want to use itemscope Website. Can I start it just after <head> and end it just before </body>?
For Website itemscope, which itemprop should I use to define the logo for the Website?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

3 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

If you place the itemscope on the <head> tag, the Microdata item "ends" with the </head> tag.

If you want to add properties from the head as well as from the body, you have three options:


specify the itemscope on the html element
specify the itemscope only on one of these and use the itemref attribute to reference properties from the other one
specify two items (one on the head and one on the body) and use the same itemid value to denote that these are about the same thing

10% popularity Vote Up Vote Down


 

@Kristi941

For the WebSite itemscope, a perfectly viable alternative would be to use JSON-LD format as opposed to Microdata, namely because the scope of a Website would include the <head> element as well.

To put that into context, the name item property of the WebPage element is best represented with the <title> element, which lives in the head of the document.

WebSite, which structurally should be the parent of WebPage (which is what all pages are be default) would be difficult to place properly using the normal DOM markup of the page.

This is why this JSON-LD is preferred for this particular form of markup to avoid create any scope problems and accidentally 'breaking' the structured data of your webpage.

Here is a sample snippet to handle most cases for the Website element:

<script type="application/ld+json">
{ "@context" : "http://schema.org",
"@type" : "WebSite",
"name" : "Example",
"alternateName" : "e.g.",
"url" : "http://example.com",
"image": "http://example.com/logo.png",
"potentialAction": {
"@type": "SearchAction",
"target": "http://example.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}




Now, I would actually advise against using logo for the WebSite property, and would prefer if you did it either as a child of WebPage or better yet use the appropriate Schema.org i.e. ProfessionalService, LocalBusiness etc to define the logo and simple use mainEntity to define your root domain to be the main entity of that property.

This is so that the logo of your ProfessionalService, CrativeWork, LocalBusiness or whatever child is appropriate is also the logo for your website by the nature of good relations as opposed to an explicit definition.

10% popularity Vote Up Vote Down


 

@Eichhorn148

No need for manual coding for it.

Just log in to Webmaster Tools,

Navigate through Search Appearance -> Data Highlighter -> Start Highlighting

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme