Do I have to create new visible elements to abide by Google's Microdata Schema.org requirements?

一曲冷凌霜 提交于 2019-12-05 21:59:24

1 - yes and yes.

2 - no, see below.

3 - OK, just add the operatingSystem, per below. If you support 2+ operatingSystem, make it an array (JSON-LD) or inlude another <span></span>.

The following is valid and will be parsed properly by Google:

<div itemscope 
     itemtype  = "http://schema.org/WebApplication"
  >
  <span itemprop  = "name">
    The Awesome Web App 01
  </span>
  <span 
        itemprop  = "locationCreated"
        itemscope
        itemtype = "http://schema.org/City" 
    >
    <span itemprop = "name">
      Chicago
    </span>
  </span>
  <span itemprop = "operatingSystem">
       Android
  </span>
  <span itemprop = "applicationCategory">
       Games
  </span>
</div>

If you want to hide the value of an element, use this approach:

<span>
  <meta itemprop = "operatingSystem" content="Android"/>
 </span>

You don’t have to provide these properties. The vocabulary Schema.org does not define any required properties.

If Google’s Structured Data Testing Tool says that a property is required, it only means that this property is required for getting one of Google’s search result features (e.g., a Rich Snippet).

If you don’t provide the properties, Google will (likely) not display that search result feature. Nothing else happens. It’s perfectly fine/normal not to provide all properties the SDTT would like to see.

If you could provide the properties, but you don’t want to have them visible on your page, you can use the link element (if the value is a URI) or the meta element (for all other values). For Microdata these elements may be added to the body, and they are hidden by default.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!