html - 电话号码上未拾取结构化数据

标签 html schema.org microdata google-rich-snippets structured-data

我的网站中有以下代码片段。当我通过 Google 结构化数据测试工具运行此程序时,它不会获取电话号码。我不确定我哪里出错了:

<div class="telephone-number" itemscope itemtype="http://schema.org/Organization">
    <p>Call Us: <a itemprop="telephone" href="tel:07749918143">07749 918 143</a></p>
</div>

验证器生成的错误是:

Node is empty. Double check that this is desired and consider removing.

有人可以告诉我哪里出错了吗?

最佳答案

Schema.org 的 telephone property需要文本作为值,而不是URL

(有 feature request 可以更改此设置。)

所以你可以使用这样的东西:

<div itemscope itemtype="http://schema.org/Organization">
    <p>Call Us: <a href="tel:07749918143"><span itemprop="telephone">07749 918 143</span></a></p>
</div>

关于html - 电话号码上未拾取结构化数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30708484/

相关文章:

HTML 字符表情符号不呈现

javascript - 仅在启用 Javascript 时显示表单

html - 在微数据中使用多个项目类型的正确方法

html - 您如何为 CreativeWork 格式化微数据中的关键字?

javascript - jQuery 文本 slider 动画

html - 当用户开始输入时输入缩小

html - 正确的 HTML5 (+ schema.org) 标记文章的发布日期和位置

microdata - 零售品牌/公司主页的正确高级 schema.org 微数据项类型是什么?

html - 在多个 div 或元素上拆分 schema.org 微数据

product - 如何用 Microdata 指示 Schema.org 'Product' 没有全局标识符?