使用结构化数据标记操作说明页面

使用 HowTo 结构化数据明确告知 Google 您的内容是操作说明。HowTo 内容旨在引导用户通过一系列步骤成功完成一项任务,可以包含视频、图片和文字。例如,“如何打领带”或“如何铺设厨房防溅墙瓷砖”。如果用户必须按顺序阅读 HowTo 中的每个步骤,您最好添加 HowTo 结构化数据,使您的内容更有吸引力。如果网页主要描述了操作说明,那么使用 HowTo 结构化数据很合适。

如果您正确标记了 HowTo 网页,它们在 Google 搜索中可能会显示为富媒体搜索结果,并且系统可能会为其生成适用于 Google 助理的操作,而这有助于您的网站触及合适的用户。

如何添加结构化数据

结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的工作原理

下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab

  1. 添加必要属性。如需了解如何在网页上放置结构化数据,请观看 JSON-LD 结构化数据:网页上的插入位置
  2. 遵循指南
  3. 使用富媒体搜索结果测试验证您的代码。
  4. 部署一些包含结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、noindex 标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址
  5. 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图Search Console Sitemap API 可以帮助您自动执行此操作。

功能可用性

目前,HowTo 富媒体搜索结果适用于所有语言,并已在所有可以使用 Google 搜索的国家/地区推出。此功能仅适用于移动设备,不适用于桌面设备。

示例

下面这些示例展示了您的内容在 HowTo 富媒体搜索结果中可能会如何呈现。如果 HowTo 包含一张 HowTo 操作完成后的图片以及每个步骤的图片,则可能会以视觉上更直观的方式显示。请务必添加尽可能多的必需属性和建议属性,以便 HowTo 能够以最有效的方式显示在 Google 搜索结果中。

标准 HowTo 富媒体搜索结果

标准 HowTo 富媒体搜索结果图片
JSON-LD

下面是一个使用 JSON-LD 的文本形式 HowTo 网页示例。此示例仅包含 1 张代表 HowTo 最终状态的图片。在此结果中,用户可以看到某些步骤的内容预览。

<html>
  <head>
    <title>How to tile a kitchen backsplash</title>
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "HowTo",
      "name": "How to tile a kitchen backsplash",
      "description": "Any kitchen can be much more vibrant with a great tile backsplash. This guide will help you install one with beautiful results, like our example kitchen seen here.",
      "image": {
        "@type": "ImageObject",
        "url": "https://example.com/photos/1x1/photo.jpg",
        "height": "406",
        "width": "305"
      },
      "estimatedCost": {
        "@type": "MonetaryAmount",
        "currency": "USD",
        "value": "100"
      },
      "supply": [
        {
          "@type": "HowToSupply",
          "name": "tiles"
        }, {
          "@type": "HowToSupply",
          "name": "thin-set mortar"
        }, {
          "@type": "HowToSupply",
          "name": "tile grout"
        }, {
          "@type": "HowToSupply",
          "name": "grout sealer"
        }
      ],
      "tool": [
        {
          "@type": "HowToTool",
          "name": "notched trowel"
        }, {
          "@type": "HowToTool",
          "name": "bucket"
        },{
          "@type": "HowToTool",
          "name": "large sponge"
        }
      ],
      "step": [
        {
          "@type": "HowToStep",
          "url": "https://example.com/kitchen#step1",
          "name": "Prepare the surfaces",
          "itemListElement": [{
            "@type": "HowToDirection",
            "text": "Turn off the power to the kitchen and then remove everything that is on the wall, such as outlet covers, switchplates, and any other item in the area that is to be tiled."
          }, {
            "@type": "HowToDirection",
            "text": "Then clean the surface thoroughly to remove any grease or other debris and tape off the area."
          }],
          "image": {
            "@type": "ImageObject",
            "url": "https://example.com/photos/1x1/photo-step1.jpg",
            "height": "406",
            "width": "305"
          }
        }, {
          "@type": "HowToStep",
          "name": "Plan your layout",
          "url": "https://example.com/kitchen#step2",
          "itemListElement": [{
            "@type": "HowToTip",
            "text": "The creases created up until this point will be guiding lines for creating the four walls of your planter box."
          }, {
            "@type": "HowToDirection",
            "text": "Lift one side at a 90-degree angle, and fold it in place so that the point on the paper matches the other two points already in the center."
          }, {
            "@type": "HowToDirection",
            "text": "Repeat on the other side."
          }],
          "image": {
            "@type": "ImageObject",
            "url": "https://example.com/photos/1x1/photo-step2.jpg",
            "height": "406",
            "width": "305"
          }
        }, {
          "@type": "HowToStep",
          "name": "Prepare your and apply mortar (or choose adhesive tile)",
          "url": "https://example.com/kitchen#step3",
          "itemListElement": [{
            "@type": "HowToDirection",
            "text": "Follow the instructions on your thin-set mortar to determine the right amount of water to fill in your bucket. Once done, add the powder gradually and make sure it is thoroughly mixed."
          }, {
            "@type": "HowToDirection",
            "text": "Once mixed, let it stand for a few minutes before mixing it again. This time do not add more water. Double check your thin-set mortar instructions to make sure the consistency is right."
          }, {
            "@type": "HowToDirection",
            "text": "Spread the mortar on a small section of the wall with a trowel."
          }, {
            "@type": "HowToTip",
            "text": "Thinset and other adhesives set quickly so make sure to work in a small area."
          }, {
            "@type": "HowToDirection",
            "text": "Once it’s applied, comb over it with a notched trowel."
          }],
          "image": {
            "@type": "ImageObject",
            "url": "https://example.com/photos/1x1/photo-step3.jpg",
            "height": "406",
            "width": "305"
          }
        }, {
          "@type": "HowToStep",
          "name": "Add your tile to the wall",
          "url": "https://example.com/kitchen#step4",
          "itemListElement": [{
            "@type": "HowToDirection",
            "text": "Place the tile sheets along the wall, making sure to add spacers so the tiles remain lined up."
          }, {
            "@type": "HowToDirection",
            "text": "Press the first piece of tile into the wall with a little twist, leaving a small (usually one-eight inch) gap at the countertop to account for expansion. use a rubber float to press the tile and ensure it sets in the adhesive."
          }, {
            "@type": "HowToDirection",
            "text": "Repeat the mortar and tiling until your wall is completely tiled, Working in small sections."
          }],
          "image": {
            "@type": "ImageObject",
            "url": "https://example.com/photos/1x1/photo-step4.jpg",
            "height": "406",
            "width": "305"
          }
        }, {
          "@type": "HowToStep",
          "name": "Apply the grout",
          "url": "https://example.com/kitchen#step5",
          "itemListElement": [{
            "@type": "HowToDirection",
            "text": "Allow the thin-set mortar to set. This usually takes about 12 hours. Don’t mix the grout before the mortar is set, because you don’t want the grout to dry out!"
          }, {
            "@type": "HowToDirection",
            "text": "To apply, cover the area thoroughly with grout and make sure you fill all the joints by spreading it across the tiles vertically, horizontally, and diagonally. Then fill any remaining voids with grout."
          }, {
            "@type": "HowToDirection",
            "text": "Then, with a moist sponge, sponge away the excess grout and then wipe clean with a towel. For easier maintenance in the future, think about applying a grout sealer."
          }],
          "image": {
            "@type": "ImageObject",
            "url": "https://example.com/photos/1x1/photo-step5.jpg",
            "height": "406",
            "width": "305"
          }
        }
      ],
      "totalTime": "P2D"
    }
    </script>
  </head>
  <body>
  </body>
</html>
微数据

下面是一个使用微数据的文本形式操作说明网页示例。此示例仅包含 1 张代表 HowTo 最终状态的图片。在此结果中,用户可以看到某些步骤的内容预览。

<html>
<head>
<title>How to tile a kitchen backsplash</title>
</head>
<body>
<div itemscope itemtype="http://schema.org/HowTo">
  <strong><span itemprop="name">How to tile a kitchen backsplash</span></strong>
  <div>About <span itemprop="estimatedCost" itemscope itemtype="http://schema.org/MonetaryAmount">
    <meta itemprop="currency" content="USD"/>
    <meta itemprop="value" content="100"/>
    $100
  </span>
  </div>
  <div>About <span itemprop="totalTime" content="P2D">2 days</span></div>
  <div itemprop="description">Any kitchen can be much more vibrant with a great
    tile backsplash. This guide will help you install one with beautiful
    results, like our example kitchen seen here.
  </div>
  <div>Necessary Items:</div>
  <div itemprop="supply" itemscope itemtype="http://schema.org/HowToSupply">
    <a itemprop="url" href="https://example.com/supplies?id=1">
      <span itemprop="name">tiles</span>
    </a>
    <img alt="image of a tiles" itemprop="image" src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div itemprop="supply" itemscope itemtype="http://schema.org/HowToSupply">
    <a itemprop="url" href="https://example.com/supplies?id=2">
      <span itemprop="name">thin-set mortar</span>
    </a>
    <img alt="image of thin-set mortar" itemprop="image"
         src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div itemprop="supply" itemscope itemtype="http://schema.org/HowToSupply">
    <a itemprop="url" href="https://example.com/supplies?id=3">
      <span itemprop="name">tile grout</span>
    </a>
    <img alt="image of a tile grout" itemprop="image"
         src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div itemprop="supply" itemscope itemtype="http://schema.org/HowToSupply">
    <a itemprop="url" href="https://example.com/supplies?id=4">
      <span itemprop="name">grout sealer</span>
    </a>
    <img alt="image of grout sealer" itemprop="image"
         src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div itemprop="tool" itemscope itemtype="http://schema.org/HowToTool">
    <a itemprop="url" href="https://example.com/supplies?id=5">
      <span itemprop="name">notched trowel</span>
    </a>
    <img alt="image of a notched trowel" itemprop="image"
         src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div itemprop="tool" itemscope itemtype="http://schema.org/HowToTool">
    <a itemprop="url" href="https://example.com/tools?id=6">
      <span itemprop="name">bucket</span>
    </a>
    <img alt="image of a bucket" itemprop="image" src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div itemprop="tool" itemscope itemtype="http://schema.org/HowToTool">
    <a itemprop="url" href="https://example.com/tools?id=7">
      <span itemprop="name">large sponge</span>
    </a>
    <img alt="image of a large sponge" itemprop="image"
         src="https://example.com/photos/1x1/photo.jpg"/>
  </div>
  <div id="step1" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <link itemprop="url" href="https://example.com/example#step1" />
    <div itemprop="name">Preparation</div>
    <img itemprop="image" alt="image showing preparation"
         src="https://example.com/photos/1x1/photo-step1.jpg"/>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Turn off the power to the kitchen and then remove
        everything that is on the wall, such as outlet covers, switchplates, and any other item in
        the area that is to be tiled. Then clean the surface thoroughly to remove any grease or
        other debris and tape off the area.
      </div>
    </div>
  </div>
  <div id="step2" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <link itemprop="url" href="https://example.com/example#step2" />
    <div itemprop="name">Plan your Layout</div>
    <img itemprop="image" alt="image showing layout planning"
           src="https://example.com/photos/1x1/photo-step2.jpg"/>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Lay out your tile horizontally below the wall where you’re going to
        place it. This makes it easy to ensure that your pattern will fit in the space provided.
        Also it helps you double check that you have enough tile and know exactly where each piece
        will go.
      </div>
    </div>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Spread the mortar on a small section of the wall with a trowel. Thinset
        and other adhesives set quickly so make sure to work in a small area. Once it’s applied,
        comb over it with a notched trowel.
      </div>
    </div>
  </div>
  <div id="step3" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <link itemprop="url" href="https://example.com/example#step3" />
    <div itemprop="name">Add your tile to the wall</div>
    <img itemprop="image" alt="image grout application"
         src="https://example.com/photos/1x1/photo-step3.jpg"/>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Place the tile sheets along the wall, making sure to add spacers so the
        tiles remain lined up. Press the first piece of tile into the wall with a little twist,
        leaving a small (usually one-eight inch) gap at the countertop to account for expansion.
        use a rubber float to press the tile and ensure it sets in the adhesive. Repeat the mortar
        and tiling until your wall is completely tiled, working in small sections.
      </div>
    </div>
  </div>
  <div id="step4" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <link itemprop="url" href="https://example.com/example#step4" />
    <div itemprop="name">Apply the grout</div>
    <img itemprop="image" alt="image grout application"
         src="https://example.com/photos/1x1/photo-step4.jpg"/>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Allow the thin-set mortar to set. This usually takes about 12 hours.
        Don’t mix the grout before the mortar is set, because you don’t want the grout to dry out!
        To apply, cover the area thoroughly with grout and make sure you fill all the joints by
        spreading it across the tiles vertically, horizontally, and diagonally. Then fill any
        remaining voids with grout.
      </div>
    </div>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Then, with a moist sponge, sponge away the excess grout and then wipe
        clean with a towel. For easier maintenance in the future, think about applying a grout
        sealer.
      </div>
    </div>
  </div>
</div>
</body>
</html>

附有各步骤图片的 HowTo 富媒体搜索结果

直观 HowTo 富媒体搜索结果图片
JSON-LD

下面是一个使用 JSON-LD 且附有各步骤图片的操作说明网页示例。网页中包含每个步骤的图片时,用户可以通过图片轮播界面查看预览。

<html>
  <head>
    <title>How to tie a tie</title>
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "HowTo",
      "image": {
        "@type": "ImageObject",
        "url": "https://example.com/1x1/photo.jpg"
      },
      "name": "How to tie a tie",
      "description": "The four-in-hand knot is a great look for any occasion. From formal suits to casual jacket and tie affairs, it’s a simple way to quickly look great. Once you have mastered the knot you can tie it in just a minute, so it’s also great when you’re in a pinch too. ",
      "totalTime": "PT2M",
      "video": {
        "@type": "VideoObject",
        "name": "Tie a Tie",
        "description": "How to tie a four-in-hand knot.",
        "thumbnailUrl": "https://example.com/photos/photo.jpg",
        "contentUrl": "http://www.example.com/videos/123_600x400.mp4",
        "embedUrl": "http://www.example.com/videoplayer?id=123",
        "uploadDate": "2019-01-05T08:00:00+08:00",
        "duration": "P1MT10S"
      },
      "supply": [
        {
          "@type": "HowToSupply",
          "name": "A tie"
        }, {
          "@type": "HowToSupply",
          "name": "A collared shirt"
        }
      ],
      "tool": [
        {
          "@type": "HowToTool",
          "name": "A mirror"
        }
      ],
      "step":[
        {
          "@type": "HowToStep",
          "name": "Preparations",
          "text": "Button your shirt how you’d like to wear it, then drape the tie around your neck. Make the thick end about 1/3rd longer than the short end. For formal button down shirts, it usually works best with the small end of the tie between 4th and 5th button.",
          "image": "https://example.com/1x1/step1.jpg",
          "url": "https://example.com/tie#step1"
        }, {
          "@type": "HowToStep",
          "name": "Crossing once",
          "text": "Cross the long end over the short end. This will form the basis for your knot.",
          "image": "https://example.com/1x1/step2.jpg",
          "url": "https://example.com/tie#step2"
        }, {
          "@type": "HowToStep",
          "name": "Second crossing",
          "text": "Bring the long end back under the short end, then throw it back over the top of the short end in the other direction.",
          "image": "https://example.com/1x1/step3.jpg",
          "url": "https://example.com/tie#step3"
        }, {
          "@type": "HowToStep",
          "name": "Loop in",
          "text": "Now pull the long end through the loop near your neck, forming another loop near your neck.",
          "image": "https://example.com/1x1/step4.jpg",
          "url": "https://example.com/tie#step4"
        }, {
          "@type": "HowToStep",
          "name": "Pull and tighten",
          "text": "Pull the long end through that new loop and tighten to fit!",
          "image": "https://example.com/1x1/step5.jpg",
          "url": "https://example.com/tie#step5"
        }
      ]
    }
    </script>
  </head>
  <body>
  </body>
</html>
微数据

下面是一个使用微数据且附有各步骤图片的操作说明网页示例。网页中包含每个步骤的图片时,用户可以通过图片轮播界面查看预览。

<html>
<head>
<title>How to tie a tie</title>
</head>
<body>
<div itemscope itemtype="http://schema.org/HowTo">
  <strong><span itemprop="name">How to tie a tie</span></strong>
  <div>About <span itemprop="totalTime" content="PT2M">2 minutes</span></div>
  <div itemprop="description">The four-in-hand knot is a great look for any occasion. From formal suits to casual jacket and tie affairs, it’s a simple way to quickly look great. Once you have mastered the knot you can tie it in just a minute, so it’s also great when you’re in a pinch too. </div>
  <div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
    <meta itemprop="name" content="Tie a Tie" />
    <meta itemprop="description" content="How to tie a four-in-hand knot." />
    <link itemprop="thumbnailUrl" content="https://example.com/photos/photo.jpg" />
    <link itemprop="contentUrl" content="http://www.example.com/videos/123_600x400.mp4" />
    <link itemprop="embedUrl" content="http://www.example.com/videoplayer?id=123" />
    <meta itemprop="duration" content="P1MT10S" />
    <meta itemprop="uploadDate" content="2019-01-05T08:00:00+08:00" />
    <video>...</video>
  </div>
  <div>Necessary Items:</div>
  <div itemprop="supply" itemtype="http://schema.org/HowToSupply">A tie</div>
  <div itemprop="supply" itemtype="http://schema.org/HowToSupply">A collared Shirt</div>
  <div itemprop="tool" itemtype="http://schema.org/HowToTool">A mirror</div>
  <div>
    <div id="step1" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
      <div itemprop="name">Preparations</div>
      <div itemprop="text">Button your shirt how you’d like to wear it, then drape the tie around your neck. Make the thick end about 1/3rd longer than the short end. For formal button down shirts, it usually works best with the small end of the tie between 4th and 5th button.</div>
      <div itemprop="image">https://example.com/1x1/photo1.jpg</div>
      <meta itemprop="url" content="https://example.com/tie#step1" />
    </div>

    <div id="step2" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
      <div itemprop="name">Crossing once</div>
      <div itemprop="text">Cross the long end over the short end. This will form the basis for your knot.</div>
      <div itemprop="image">https://example.com/1x1/photo2.jpg</div>
      <meta itemprop="url" content="https://example.com/tie#step2" />
    </div>

    <div id="step3" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
      <div itemprop="name">Second crossing</div>
      <div itemprop="text">Bring the long end back under the short end, then throw it back over the top of the short end in the other direction.</div>
      <div itemprop="image">https://example.com/1x1/photo3.jpg</div>
      <meta itemprop="url" content="https://example.com/tie#step3" />
    </div>

    <div id="step4" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
      <div itemprop="name">Loop in</div>
      <div itemprop="text">Now pull the long end through the loop near your neck, forming another loop near your neck.</div>
      <div itemprop="image">https://example.com/1x1/photo4.jpg</div>
      <meta itemprop="url" content="https://example.com/tie#step4" />
    </div>

    <div id="step5" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
      <div itemprop="name">Pull and tighten</div>
      <div itemprop="text">Pull the long end through that new loop and tighten to fit!</div>
      <div itemprop="image">https://example.com/1x1/photo5.jpg</div>
      <meta itemprop="url" content="https://example.com/tie#step5" />
    </div>
  </div>
</div>
</body>
</html>

包含视频的 HowTo 富媒体搜索结果

JSON-LD

下面是一个使用 JSON-LD 且同时包含文字、图片和视频剪辑的操作说明网页示例。

<html>
  <head>
    <title>How to create a Trivia action</title>
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "HowTo",
      "image": {
        "@type": "ImageObject",
        "url": "https://example.com/1x1/photo.jpg"
      },
      "name": "How to create a Trivia action",
      "description": "Learn how to create a Trivia action for Assistant within minutes.",
      "totalTime": "PT2M",
      "video": {
        "@type": "VideoObject",
        "name": "Build a Trivia Game for the Google Assistant with No Code",
        "description": "Learn how to create a Trivia action for Assistant within minutes.",
        "thumbnailUrl": "https://example.com/photos/photo.jpg",
        "contentUrl": "https://www.youtube.com/watch?v=4AOI1tZrgMI",
        "embedUrl": "https://www.youtube.com/embed/4AOI1tZrgMI",
        "uploadDate": "2019-01-05T08:00:00+08:00",
        "duration": "P1MT10S",
        "hasPart": [
          {
            "@type": "Clip",
            "@id": "Clip1",
            "name": "Open Actions on Google Console",
            "startOffset": 29,
            "endOffset": 36,
            "url": "http://www.example.com/example&amp;t=29"
          },
          {
            "@type": "Clip",
            "@id": "Clip2",
            "name": "Select Trivia Template",
            "startOffset": 36,
            "endOffset": 45,
            "url": "http://www.example.com/example&amp;t=36"
          },
          {
            "@type": "Clip",
            "@id": "Clip3",
            "name": "Choose a Personality",
            "startOffset": 45,
            "endOffset": 65,
            "url": "http://www.example.com/example&amp;t=45"
          },
          {
            "@type": "Clip",
            "@id": "Clip4",
            "name": "Feed your content",
            "startOffset": 65,
            "endOffset": 154,
            "url": "http://www.example.com/example&amp;t=65"
          },
          {
            "@type": "Clip",
            "@id": "Clip5",
            "name": "Create the action",
            "startOffset": 154,
            "endOffset": 172,
            "url": "http://www.example.com/example&amp;t=154"
          },
          {
            "@type": "Clip",
            "@id": "Clip6",
            "name": "Test your action",
            "startOffset": 172,
            "endOffset": 212,
            "url": "http://www.example.com/example&amp;t=172"
          },
          {
            "@type": "Clip",
            "@id": "Clip7",
            "name": "Submit your action",
            "startOffset": 212,
            "endOffset": 285,
            "url": "http://www.example.com/example&amp;t=212"
          }
        ]
      },
      "step": [
        {
          "@type": "HowToStep",
          "name": "Open Actions on Google Console",
          "text": "Navigate to https://console.actions.google.com to get started.",
          "image": "https://example.com/1x1/step1.jpg",
          "url": "https://example.com/tie#step1",
          "video": {
            "@id": "Clip1"
          }
        },
        {
          "@type": "HowToStep",
          "name": "Select Trivia Template",
          "text": "Create a new project and select Templates | You have a choice to select between Trivia, Flashcard or Personality Quiz.",
          "image": "https://example.com/1x1/step2.jpg",
          "url": "https://example.com/tie#step2",
          "video": {
            "@id": "Clip2"
          }
        },
        {
          "@type": "HowToStep",
          "name": "Choose a Personality",
          "text": "Select one of the three personalities- Mr, Montgomery, Regal Queen, or the Trivia Bot.",
          "image": "https://example.com/1x1/step3.jpg",
          "url": "https://example.com/tie#step3",
          "video": {
            "@id": "Clip3"
          }
        },
        {
          "@type": "HowToStep",
          "name": "Feed your content",
          "itemListElement": [
            {
              "@type": "HowToDirection",
              "text": "Make a copy of our pre-filled sheet and replace with your content."
            },
            {
              "@type": "HowToDirection",
              "text": "Ensure you make the sheet publicly accessible. Copy the URL of the sheet and paste it into the Console."
            }
          ],
          "image": "https://example.com/1x1/step4.jpg",
          "url": "https://example.com/tie#step4",
          "video": {
            "@id": "Clip4"
          }
        },
        {
          "@type": "HowToStep",
          "name": "Create the action",
          "text": "Create the action. Once content is successfully uploaded, it will take couple of minutes to create the action.",
          "image": "https://example.com/1x1/step5.jpg",
          "url": "https://example.com/tie#step5",
          "video": {
            "@id": "Clip5"
          }
        },
        {
          "@type": "HowToStep",
          "name": "Test your action",
          "text": "Navigate to the Simulator to test your action and simulate various surfaces, locations and locales.",
          "image": "https://example.com/1x1/step6.jpg",
          "url": "https://example.com/tie#step6",
          "video": {
            "@id": "Clip6"
          }
        },
        {
          "@type": "HowToStep",
          "name": "Submit your action",
          "text": "Once you complete directory information and invocation names, submit your action for all Assistant users to see and use your action.",
          "image": "https://example.com/1x1/step7.jpg",
          "url": "https://example.com/tie#step7",
          "video": {
            "@id": "Clip7"
          }
        }
      ]
    }
    </script>
  </head>
  <body>
  </body>
</html>
微数据

下面是一个使用微数据且同时包含文字、图片和视频剪辑的操作说明网页示例。

<html>
<head>
<title>How to create a Trivia action</title>
</head>
<body>
<div itemscope itemtype="http://schema.org/HowTo">
  <strong><span itemprop="name">How to create a Trivia action</span></strong>
  <div>About <span itemprop="totalTime" content="PT2M">2 minutes</span></div>
  <div itemprop="description"> Learn how to create a Trivia action for Assistant within minutes. </div>
  <div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
    <meta itemprop="name" content="Tie a Tie" />
    <meta itemprop="description" content="How to tie a four-in-hand knot." />
    <link itemprop="thumbnailUrl" content="https://example.com/photos/photo.jpg" />
    <link itemprop="contentUrl" content="http://www.example.com/videos/123_600x400.mp4" />
    <link itemprop="embedUrl" content="http://www.example.com/videoplayer?id=123" />
    <meta itemprop="duration" content="P1MT10S" />
    <meta itemprop="uploadDate" content="2019-01-05T08:00:00+08:00" />
    <div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip1">
        <div itemprop="name">Open Actions on Google Console</div>
        <div itemprop="startOffset">29</div>
        <div itemprop="endOffset">36</div>
        <div itemprop="url">http://www.example.com/example&amp;t=29</div>
      </div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip2">
        <div itemprop="name">Select Trivia Template</div>
        <div itemprop="startOffset">36</div>
        <div itemprop="endOffset">45</div>
        <div itemprop="url">http://www.example.com/example&amp;t=36</div>
      </div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip3">
        <div itemprop="name">Choose a Personality</div>
        <div itemprop="startOffset">45</div>
        <div itemprop="endOffset">65</div>
        <div itemprop="url">http://www.example.com/example&amp;t=45</div>
      </div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip4">
        <div itemprop="name">Feed your content</div>
        <div itemprop="startOffset">65</div>
        <div itemprop="endOffset">154</div>
        <div itemprop="url">http://www.example.com/example&amp;t=65</div>
      </div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip5">
        <div itemprop="name">Create the action</div>
        <div itemprop="startOffset">154</div>
        <div itemprop="endOffset">172</div>
        <div itemprop="url">http://www.example.com/example&amp;t=154</div>
      </div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip6">
        <div itemprop="name">Test your action</div>
        <div itemprop="startOffset">172</div>
        <div itemprop="endOffset">212</div>
        <div itemprop="url">http://www.example.com/example&amp;t=172</div>
      </div>
      <div itemprop="hasPart" itemscope itemtype="http://schema.org/Clip" itemid="Clip7">
        <div itemprop="name">Submit your action</div>
        <div itemprop="startOffset">212</div>
        <div itemprop="endOffset">285</div>
        <div itemprop="url">http://www.example.com/example&amp;t=212</div>
      </div>
    </div>
    <video>...</video>
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Open Actions on Google Console</div>
    <div itemprop="text">Navigate to https://console.actions.google.com to get started.</div>
    <div itemprop="image">https://example.com/1x1/photo1.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step1" />
    <link itemprop="video" href="Clip1" />
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Select Trivia Template</div>
    <div itemprop="text">Create a new project and select Templates | You have a choice to select between Trivia, Flashcard or Personality Quiz.</div>
    <div itemprop="image">https://example.com/1x1/photo2.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step2" />
    <link itemprop="video" href="Clip2" />
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Choose a Personality</div>
    <div itemprop="text">Select one of the three personalities- Mr, Montgomery, Regal Queen, or the Trivia Bot.</div>
    <div itemprop="image">https://example.com/1x1/photo3.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step3" />
    <link itemprop="video" href="Clip3" />
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Feed your content</div>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Make a copy of our pre-filled sheet and replace with your content.</div>
    </div>
    <div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
      <div itemprop="text">Ensure you make the sheet publicly accessible. Copy the URL of the sheet and paste it into the Console.</div>
    </div>
    <div itemprop="image">https://example.com/1x1/photo4.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step4" />
    <link itemprop="video" href="Clip4" />
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Create the action</div>
    <div itemprop="text">Create the action. Once content is successfully uploaded, it will take couple of minutes to create the action.</div>
    <div itemprop="image">https://example.com/1x1/photo5.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step5" />
    <link itemprop="video" href="Clip5" />
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Test your action</div>
    <div itemprop="text">PNavigate to the Simulator to test your action and simulate various surfaces, locations and locales.</div>
    <div itemprop="image">https://example.com/1x1/photo6.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step6" />
    <link itemprop="video" href="Clip6" />
  </div>
  <div itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
    <div itemprop="name">Submit your action</div>
    <div itemprop="text">Once you complete directory information and invocation names, submit your action for all Assistant users to see and use your action.</div>
    <div itemprop="image">https://example.com/1x1/photo7.jpg</div>
    <meta itemprop="url" content="https://example.com/tie#step7" />
    <link itemprop="video" href="Clip7" />
  </div>
</div>
</body>
</html>

指南

若想让您的网页可显示为 HowTo 富媒体搜索结果以及可由系统生成适用于 Google 助理的 HowTo 操作,您必须遵循以下指南:

内容指南

  • 广告:请勿将 HowTo 结构化数据用于广告目的。
  • 不符合条件的内容:如果内容为淫秽、亵渎、露骨色情或血腥暴力内容,宣扬危险活动或违法活动,或使用仇恨性/骚扰性语言,则可能不会显示为 HowTo 富媒体搜索结果。
  • 来源:在来源网页上,必须向用户显示所有 HowTo 内容。HowTo 应该是来源网页的主要内容。请勿为特定网页添加多个 HowTo
  • 材料和工具:向对完成相应任务必不可少的所有材料和工具添加结构化数据。
  • 步骤:每个 HowToStep 都必须包含来源步骤的完整内容。请勿将非步骤数据(例如摘要或说明部分)标记为步骤。
  • 步骤图片:如果步骤最适合以图片形式呈现,请确保针对每个 HowToStep 为这些步骤中的图片添加标记。仅标记每个步骤专用的说明性步骤图片;此外,请勿在同一 HowTo 的多个步骤中使用同一张图片。请使用与网页内容相对应的那些图片。不要使用不反映 HowTo 内容的图片,也不要使用不同的图片来优化富媒体搜索结果。
  • 最终图片:如果可以用一张图片准确描述最终结果,请确保此图片显示在相应网页上,并且使用 image 属性将此图片包含在 HowTo 标记中。此图片可与在上一步骤中标记的图片相同。
  • 内容:请勿将 HowTo 标记用于食谱。食谱应使用 Recipe structured data。不属于一系列特定说明的文章和一般建议内容不适合使用 HowTo 标记。

结构化数据类型定义

如果要使你的内容能够显示为富媒体搜索结果,你必须为它添加必需的属性。您还可以添加建议的属性,以便向结构化数据添加更多信息,进而提供更好的用户体验。

HowTo

如需了解 HowTo 的完整定义,请访问 schema.org/HowTo

HowTo 类型表示相应网页包含 HowTo。每个网页都必须有一个 HowTo 类型定义。

必需的属性
name

Text

HowTo 的标题。例如,“如何打领带”。

step HowToStepHowToSection

HowToStep 元素数组,包含 HowTo 的完整说明。每个 step 元素都应与说明中的某个步骤对应。请勿使用此属性来标记非步骤数据(例如摘要或说明部分)。 例如:

  • 您可以设置每个 HowToSteptext,为每个步骤指定完整文字内容。image、作为 name 提供的步骤标题和 url 是可选的,但我们建议您使用这些属性,因为可选属性可能有助于呈现富媒体搜索结果。
  • 对于复杂的步骤,您可以提供步骤 name,并使用 HowToDirectionHowToTip 列出各个子步骤。

HowToSection 元素数组,包含此 HowTo 的完整说明。例如:

建议的属性
description

Text

HowTo 的说明。

estimatedCost MonetaryAmountText

按说明操作时所耗材料的估算费用。

image ImageObjectURL

HowTo 操作完成后的图片。其他图片指南:

  • 图片网址必须可抓取且可编入索引
  • 图片必须代表已标记的内容。
  • 图片格式必须为 .jpg、.png 或 .gif。
supply HowToSupplyText

按说明或指导操作时所消耗的材料。

tool HowToToolText

按说明或指导操作时使用(但未消耗掉)的物品。

totalTime Duration

执行所有说明/指导需消耗的总时间,包括准备材料的时间(采用 ISO 8601 时长格式)。

video VideoObject

HowTo 的视频。位于必需的和建议的 Video 属性列表后面。使用 hasPart 标记视频的各个步骤。

video.hasPart

Clip

整个视频中所包含的某段视频剪辑。

video.hasPart.endOffset

Number

剪辑的结束时间,即从视频开头到剪辑结束之间经过的秒数。

video.hasPart.name

Text

剪辑的名称。例如,对于介绍如何拉紧领带的剪辑,其名称可以是“拉紧”。

hasPart.startOffset

Number

剪辑的开始时间,即从视频开头到剪辑开始之间经过的秒数。

video.hasPart.url

URL

指向剪辑开始时间的链接。此开始时间必须与 video.hasPart.startOffset 中设置的值一致。例如:

"startOffset": 30,
"endOffset": 45,
"url": "http://www.example.com/example&t=30"

HowToSection

如需了解 HowToSection 的完整定义,请访问 schema.org/HowToSection

HowToSection 类型用于定义单个 HowTo 的一部分,可包含一个或多个步骤。不得使用 HowToSection 来定义可用于完成相应任务的不同方法,而是要将 HowToSection 用作一种方法的一部分。如需列举可用于完成相应任务的多种方法,请使用多个 HowTo 对象。例如,您可以将更换爆胎的多种方法列为多个 HowTo 对象,而不是 HowToSection 对象。

必需的属性
itemListElement HowToStep

相应部分的详细步骤列表。

name Text

相应部分的名称。

HowToStep

如需了解 HowToStep 的完整定义,请访问 schema.org/HowToStep

HowToStep 类型用于定义 HowTo 中的简单文字步骤,可包含图片。

必需的属性
itemListElement HowToDirectionHowToTip

详细子步骤列表,包括指导或提示。

如果使用了 text,则该属性为可选属性。

text Text

相应步骤的完整说明文字。

如果使用了 itemListElement,则该属性为可选属性。其他指南:

  • 只能添加说明文字,不能添加“指导”、“观看视频”、“第 1 步”等其他文字。请在所标记的属性之外指定这些词组。
建议的属性
image ImageObjectURL

相应步骤的图片。其他图片指南:

  • 图片网址必须可抓取且可编入索引
  • 图片必须代表已标记的内容。
  • 图片格式必须为 .jpg、.png 或 .gif。
name Text

步骤的总结性字词或短语(例如“将电线连接到接线头上”或“挖掘”)。 请勿使用非描述性文字(例如“第 1 步:[文字]”)或其他形式的步骤编号(例如“1. [文字]”)。

url URL

一个 URL,可直接链接到相应步骤(如果有)。例如,锚链接片段。

video VideoObjectClip

相应步骤的视频或视频剪辑。

如果是 VideoObject,则位于必需的和建议的 Video 属性列表后面。

HowToSupplyHowToTool

如需了解 HowToSupplyHowToTool 的完整定义,请访问 schema.org/HowToSupplyschema.org/HowToTool

HowToSupplyHowToTool 用于完成 HowTo。这两者具有相同的必需属性和建议属性。

必需的属性
name Text

材料或工具的名称。

建议的属性
image ImageObjectURL

材料或工具的图片。其他图片指南:

  • 图片网址必须可抓取且可编入索引
  • 图片必须代表已标记的内容。
  • 图片格式必须为 .jpg、.png 或 .gif。

HowToDirectionHowToTip

如需了解 HowToDirectionHowToTip 的完整定义,请访问 schema.org/HowToDirectionschema.org/HowToTip

HowToDirectionHowToTip 用于描述指导或提示。这两者具有相同的必需属性和建议属性。

必需的属性
text Text

指导或提示的文字。

使用 Search Console 监控富媒体搜索结果

Search Console 是一款工具,可帮助您监控网页在 Google 搜索结果中的显示效果。即使没有注册 Search Console,您的网页也可能会显示在 Google 搜索结果中,但注册 Search Console 能够帮助您了解 Google 如何查看您的网站并做出相应的改进。建议您在以下情况下查看 Search Console:

  1. 首次部署结构化数据后
  2. 发布新模板或更新代码后
  3. 定期分析流量时

首次部署结构化数据后

等 Google 将网页编入索引后,请在相关的富媒体搜索结果状态报告中查看是否存在问题。 理想情况下,您应该会看到有效网页数增加了,但错误数或警告数没有增加。如果您发现结构化数据存在问题,请执行以下操作:

  1. 修正错误
  2. 检查实际网址,核实问题是否仍然存在。
  3. 使用状态报告请求验证

发布新模板或更新代码后

对网站进行重大更改后,请监控结构化数据的错误数和警告数是否增加了。
  • 如果您发现错误增多了,可能是因为您推出的某个新模板无法正常工作,或者您的网站以一种新的错误方式与现有模板交互。
  • 如果您发现有效内容项减少了(但错误数的增加情况并不对应),可能是因为您的网页中未再嵌入结构化数据。请通过网址检查工具了解导致此问题的原因。

定期分析流量时

请使用效果报告分析您的 Google 搜索流量。数据将显示您的网页在 Google 搜索结果中显示为富媒体搜索结果的频率、用户点击该网页的频率以及网页在搜索结果中的平均排名。您还可以使用 Search Console API 自动提取这些结果。

问题排查

如果您在实施结构化数据时遇到问题,请查看下面列出的一些实用资源。