0
  1. I want to use itemscope Website. Can I start it just after <head> and end it just before </body>?
  2. For Website itemscope, which itemprop should I use to define the logo for the Website?
  • You mean not in the head section but in the body, as covered here, right? – dan Apr 19 '16 at 7:09
  • These two questions don’t seem to be related. I’d suggest to remove the second question and create a separate question post for it, if needed. – unor Apr 19 '16 at 16:42
1

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.

1

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
-3

No need for manual coding for it.

Just log in to Webmaster Tools,

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

  • But "Type of the information to highlight" doesn't have what I wish to have/what my Website is about. So in this case we must I should write manual code only, right? Or do I have any other alternative? – Gabi Apr 19 '16 at 12:13
  • This would only help Google, while using markup would help all interested consumers. – unor Apr 19 '16 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.