gpt4 book ai didi

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

转载 作者:技术小花猫 更新时间:2023-10-29 12:04:11 24 4
gpt4 key购买 nike

我有以下问题。我已将微数据模式添加到我的页面,但我想隐藏。有人有想法吗?

我使用的代码如下:

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

对于不可见的链接,使用标签 link 就像示例中那样。

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

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

关于html - 如何隐藏微数据模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16336655/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com