我的网站中有以下代码片段。当我通过 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/