Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schema.org - Data on hidden elements [closed]

Tags:

html

seo

schema

How would search engines react if i made a hidden field with schema data in it?

$100.00 USD

The reason I'm feeling forced to do this is because when I use Google Webmaster Tools to make my schema it requires the price to be tagged.

So do i really need to tag the price, and what would happen if i tagged a hidden price?

Keep in mind I don't want to show the price in this specific case.

like image 961
andershagbard Avatar asked Jan 21 '14 16:01

andershagbard


2 Answers

You want to hide the microdata by using the meta tag.

For example,

<div itemscope itemtype="http://schema.org/Product">
    <span itemprop="name">Funky Skirt</span>
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <meta itemprop="price" content="100.00" />
        <link itemprop="availability" href="http://schema.org/InStock" />In stock
    </div>
</div>

This is a better way to hide microdata than using css because Google doesn't like it when content is hidden with either

visibility: hidden;

or

display: none;

Hope this helps.

like image 100
tangydoris Avatar answered Oct 16 '22 13:10

tangydoris


Another thing to keep in mind, though, is that if you want Google to display a rich snippet for your product, you must mark up at least the product name, info, offer/price, and the ISO currency code. So by hiding the price to visitors by using a meta tag, you basically disqualify your product markup for a rich snippet. You may or may not care about that, but I just thought I'd mention it.

like image 33
daviddeering Avatar answered Oct 16 '22 13:10

daviddeering