html - 'leadForm' 的 Schema.org 验证错误(在 HTML+微数据表中)

标签 html schema.org microdata

根据潜在客户表单中的内容创建电子邮件并收到来自 https://www.google.com/webmasters/markup-tester/ 的错误当微数据在表中时声明我有一个无效的项目类型:

leadForm (The type leadForm is not a type known to Google.)

下面的第一个代码块没有显示任何错误,而第二个代码块获得了无效的项目类型。为什么?

有效示例

<section itemscope itemtype="http://schema.org/leadForm">
<p>First Name:<span itemprop="firstName">[first_name]</span></p>
<p>Last Name:<span itemprop="lastName">[last_name]</span></p>
<p>Phone:<span itemprop="phone">[phone]</span></p>
</section>

无效的项目类型

<section itemscope itemtype="http://schema.org/leadForm">
<table width="500" border="0" cellspacing="3" cellpadding="2">
  <tbody>
    <tr>
      <td width="230"><strong>First Name:</strong></td>
      <td width="253"><span itemprop="firstName">[first_name]</span></td>
    </tr>
    <tr>
      <td><strong>Last Name:</strong></td>
      <td><span itemprop="lastName">[last_name]</span></td>
    </tr>
    <tr>
      <td><strong>Phone:</strong></td>
      <td><span itemprop="phone">[phone]</span></td>
    </tr>
    <tr>
      <td><strong>Email:</strong></td>
      <td><span itemprop="email">[email]</span></td>
    </tr>
    <tr>
      <td><strong>Language Preference:</strong></td>
      <td><span itemprop="lang">[lang]</span></td>
    </tr>
    <tr>
      <td><strong>Best Time to Contact</strong></td>
      <td><span itemprop="contactPref">[contactPref]</span></td>
    </tr>
    <tr>
      <td><strong>Comments/Special Instructions:</strong></td>
      <td><span itemprop="comments">[comments]</span></td>
    </tr>
  </tbody>
</table>
</section>

最佳答案

http://schema.org/leadForm 不是有效类型。因为它以小写字母开头(leadForm 而不是 LeadForm),它无论如何都是一个属性,但是这个 doesn’t exist .

我认为 Google 的测试工具应该会针对第一个代码段报告相同的错误;这似乎是一个小故障,但事实并非如此。

关于html - 'leadForm' 的 Schema.org 验证错误(在 HTML+微数据表中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38516399/

相关文章:

python - google knowledge graph api 支持哪些 schema.org 类型?

schema.org - 如何为 ItemList 中的产品编写标记?

php - echo <a> 标签内的变量

html - CSS中彩色背景上的透明文本

javascript - 如何在单击按钮时检查多个范围 slider 的值,然后根据值执行某些操作?

markup - 我应该如何根据 schema.org 标记价格列和设置费用

seo - 在工作人员中使用 Rich Snippet Person 的正确性如何?

html - 如何将图标放在段落旁边

html - 不同的 div,相同的 itemscope

schema.org - 网站连结搜寻框JSON-LD在Google结构化资料测试工具上显示错误