Is it OK to hide microdata with CSS?

ladar picture ladar · Jan 18, 2012 · Viewed 15.5k times · Source

let's say I have some html document with a lot of text. Is it "good" (~not bad :)) to have elements that contain microdata and hide those elements so that user won't actually see them?

Let's say I have this:

<div style="display:none" itemscope...>some microdata describing div below</div>
<div> There is actual text that is described by microdata</div>

The point is that this way it may be easier to describe the 2nd div. You don't have to make changes in whole text, just add some elements and hide them. I want to create simple HTML editor that would support creating microdata and this way seems to be easier to implement and personally easier to use (first create actual content, then annotate it).

Answer

Rowe Morehouse picture Rowe Morehouse · Aug 25, 2012

schema.org has an actual method for "hiding" microdata:

http://schema.org/docs/gs.html#advanced_missing

If you are trying to impact SEO then "hiding" your semantic markup data from the user but keeping it machine readable (for robots / spiders) does not defeat the purpose at all.

If your schema.org markup is properly formatted, google is not going to penalize your index rankings if you "hide" the values.