tag link español attribute html microdata

html - link - ¿Cómo ocultar el esquema de microdatos?



title html español (3)

Tengo el siguiente problema. He agregado el esquema de microdatos a mi página, pero quiero ocultar. ¿Alguien tiene una idea?

El código que he usado es el siguiente:

<div itemscope itemtype="http://schema.org/LocalBusiness"> <a itemprop="url" href="http://www.example.net/"><div itemprop="name"><strong>Audiosky Mobile Development</strong></div> </a> <div itemprop="description">Description/div> <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="addressLocality">Los Angeles</span><br> <span itemprop="addressRegion">California</span><br> <span itemprop="postalCode"></span><br> <span itemprop="addressCountry">USA</span><br> </div> </div>


Si desea ocultar su marca, puede utilizar etiquetas meta. Como en el ejemplo de la página de inicio de schema.org

<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>

Para los enlaces invisibles use el enlace de la etiqueta como en el ejemplo.

<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>

Sin embargo, no utilice en exceso el texto oculto, ya que los motores de búsqueda pueden juzgarlo como spam. En su caso, le aconsejo poner el marcado en el bloque de direcciones en su página principal o de contacto y ocultar solo algunas etiquetas.


También puedes intentar esto para ocultarlo del usuario. Funciona bien para mí.

<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>


mejor que css hide o meta & link tags, usa JSON + LD

ejemplo de 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>