Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does Microdata (for rich snippets) have to be visible to the visitor to be displayed in Google search results?

I want to add the rich snippet to my page, but I don't want it in the format that is required. So I thought I could add it as a hidden div, but I'm not sure if that will work.

<div style="visibility:hidden;height:0px;" itemscope itemtype="http://schema.org/LocalBusiness">
<div itemprop="name"><asp:Literal ID="ltTitle" runat="server" /></div>
<div itemprop="description"><asp:Literal ID="ltMetadescription" runat="server" /></div>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
    <span itemprop="streetAddress"><asp:Literal ID="ltAddress" runat="server" /></span>
    <span itemprop="postalCode"><asp:Literal ID="ltZipcode" runat="server" /></span> 
    <span itemprop="addressLocality"><asp:Literal ID="ltCity" runat="server" /></span>
    <span itemprop="addressRegion"><asp:Literal ID="ltProvince" runat="server" /></span> 
    <span itemprop="addressCountry"><asp:Literal ID="ltCountry" runat="server" /></span>
share|improve this question
Related: Can microdata be implemented in meta tags?. You might want to use JSON-LD instead of Microdata. – unor Jun 10 '15 at 17:38
up vote 7 down vote accepted

Your rich snippet data needs to be visible to users. From Google's rich snippet troubleshooting:

Is your marked-up content hidden from users?

In general, Google won't display any content in rich snippets that is not visible to human user. It can be tempting to add all the content relevant for a rich snippet in one place on the page, mark it up, and then hide the entire block of text using techniques like display:none, value-title, css etc. Don't do it! Google will ignore content that isn't visible to human users, so you should mark up the text that visitors will see on your web pages.

Note that in a few limited circumstances, it can be useful to provide both a machine-readable and a human-readable version of your content. For example, because the text string "Elvis's birthday" is significant to a great many human readers, but less so to machines, Google provides a way to provide the date in a machine-readable form—1935-01-08—while still displaying the content in a human-friendly way. For more information, check the Help article for each product type.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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