html - 为谷歌搜索结果添加星星,没有 wordpress,只有 html css
问题描述
如何仅使用 html 和 css 创建评分星?
我正在从头开始创建博客。我想使用该 wordpress 功能将星添加到谷歌结果中。
如何仅使用 html 和 css 来获得此信息?(我没有使用wordpress)
更新
我应该添加此代码,它会出现在谷歌搜索结果中吗?
<div itemscope itemtype="http://schema.org/Review">
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Restaurant">
<img itemprop="image" src="seafood-restaurant.jpg" alt="Catcher in the Rye"/>
<span itemprop="name">Legal Seafood</span>
</div>
<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<span itemprop="ratingValue">4</span>
</span> stars -
<b>"<span itemprop="name">A good seafood place.</span>" </b>
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Bob Smith</span>
</span>
<span itemprop="reviewBody">The seafood is great.</span>
<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Washington Times">
</div>
</div>
解决方案
推荐阅读
- asp.net - 是否可以使用 ASP.net 调用同步 http post 请求?
- kotlin - 从具有 runtimeOnly 依赖项的模块注册 Koin 组件
- django - 'choices' 必须是包含(实际值,人类可读名称)元组的可迭代 django 3.1
- javascript - 通过不同的按钮单击在数组上添加和删除元素
- swift - 表格单元格未在 Swift 上适当调整高度
- android - 无法从协程 withContext(Dispatchers.Main.imidiate){} 更新类变量的值
- assembly - 使用 makefile 在 Raspberry Pi 4 上组装
- ios - 独立的 watchOs app 需要分发吗?
- audio - AVCodecContext->frame_size 和 AVFrame->nb_samples 之间的音频样本大小差异
- javascript - 更改屏幕宽度时更改变量(例如横向到纵向)