gpt4 book ai didi

html - 如何在谷歌中索引星级?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:44:30 25 4
gpt4 key购买 nike

这是我网站上的 HTML 标记,它在一些 CSS 的帮助下显示星级。

现在我已经阅读了整个 google document但我仍然无法理解如何更改我的标记。我不愿意在 css 中进行更改,而且我没有那么多可用数据,因此无法按照 google 文档中提到的微数据/RDF 创建标记。

要使 Google 了解该元素的综合评分,我可以做的最小更改是多少?

<div class="store__rating">
<meta content="5" itemprop="rating">
<div class="rateStars"><span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="reviewCount">
2Reviews
</span>
</div>
</div>

enter image description here

最佳答案

我最终这样做了,here is the testing tool , 只需粘贴 HTML 并验证

<div class="store__rating" typeof="v:Review-aggregate" xmlns:v="http://rdf.data-vocabulary.org/#">
<span rel="v:rating">
<span typeof="v:Rating">
<span content="5" property="v:average"></span>
<span content="5" property="v:best"></span>
</span>
</span>
<span content="2" property="v:count"></span>
<div class="rateStars"><span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="filled_green"><i class="icon-star"></i></span>
<span class="reviewCount">
2 Reviews
</span>
</div>
</div>

关于html - 如何在谷歌中索引星级?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29002811/

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