加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – 如何隐藏微数据模式?

发布时间:2020-12-14 23:49:29 所属栏目:资源 来源:网络整理
导读:我有以下问题.我已经将微数据模式添加到我的页面,但我想隐藏. 任何人都有想法? 我使用的代码如下: div itemscope itemtype="http://schema.org/LocalBusiness"a itemprop="url" href="http://www.example.net/"div itemprop="name"strongAudiosky Mobile D
我有以下问题.我已经将微数据模式添加到我的页面,但我想隐藏.
任何人都有想法?

我使用的代码如下:

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

解决方法

如果要隐藏您的标记,您可以使用元标记.
就像从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>

对于不可见的链接,使用标签链接就像例子.

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

然而,不要过度使用隐藏的文本,因为搜索引擎可能会判断它有点垃圾.在你的情况下,我建议在你的主页或联系页面的地址块中放置标记,并且只隐藏几个标签.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读