html - How to hide microdata schema?

ID : 274347

viewed : 39

Tags : htmlmicrodatahtml





Top 4 Answer for html - How to hide microdata schema?

vote vote

97

If you want to hide your markup you may use meta tags. Like in example from schema.org Getting Started page

<div itemscope itemtype="http://schema.org/Offer">   <span itemprop="name">Blend-O-Matic</span>   <span itemprop="price">$19.95</span>   <div itemprop="reviews" itemscope itemtype="http://schema.org/AggregateRating">     <img src="four-stars.jpg">     **<meta itemprop="ratingValue" content="4">**     **<meta itemprop="bestRating" content="5">**     Based on <span itemprop="ratingCount">25</span> user ratings   </div> </div> 

For invisible links use tag link like in example.

<div itemscope itemtype="http://schema.org/Offer">   <span itemprop="name">Blend-O-Matic</span>   <span itemprop="price">$19.95</span>   **<link itemprop="availability" href="http://schema.org/InStock">**Available today! </div>  

However don't overuse hidden text as Search Engines may judge it somewhat spammy. In your case I advise to put markup in address block at your main or contact page and hide only few tags.

vote vote

84

better than css hide or meta & link tags, use JSON+LD

example from https://schema.org/LocalBusiness

<script type="application/ld+json"> {   "@context": "http://schema.org",   "@type": "LocalBusiness",   "address": {     "@type": "PostalAddress",     "addressLocality": "Mexico Beach",     "addressRegion": "FL",     "streetAddress": "3102 Highway 98"   },   "description": "A superb collection of fine gifts and clothing to accent your stay in Mexico Beach.",   "name": "Beachwalk Beachwear & Giftware",   "telephone": "850-648-4200" } </script> 
vote vote

80

You can also try this to hide it from user. It working fine for me.

<address style="display: none;">     <div itemscope itemtype="http://schema.org/Offer">       <span itemprop="name">Blend-O-Matic</span>       <span itemprop="price">$19.95</span>       <div itemprop="reviews" itemscope itemtype="http://schema.org/AggregateRating">         <img src="four-stars.jpg">         **<meta itemprop="ratingValue" content="4">**         **<meta itemprop="bestRating" content="5">**         Based on <span itemprop="ratingCount">25</span> user ratings       </div>     </div>  </address> 
vote vote

65

Top 3 video Explaining html - How to hide microdata schema?







Related QUESTION?