作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
这是我网站上的 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>
最佳答案
我最终这样做了,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/
我是一名优秀的程序员,十分优秀!