Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Does Google Microdata for rich snippets have to be visible to the visitor to be displayed in 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>
</div>
</div>

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 3 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
add comment

Your Answer

 
discard

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.