小编Oub*_*hat的帖子

当前页面上的面包屑

我目前实现了像这样的面包屑:

<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="HOME URL" itemprop="url">
        <span itemprop="title">HOME TITLE</span>
    </a> > 
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="1ST LEVEL URL" itemprop="url">
        <span itemprop="title">1ST LEVEL TITLE</span>
    </a> > 
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <span itemprop="title">CURRENT TITLE</span>
</div>
Run Code Online (Sandbox Code Playgroud)

如您所见,我没有为当前页面指定一个URL,这将是多余的.但是,当我尝试使用Google测试工具时,我收到一条错误消息,指出当前页面痕迹的网址丢失了.

鉴于此,我有三个选择,我可以想到.

我为当前页面指定了一个url:

<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="HOME URL" itemprop="url">
        <span itemprop="title">HOME TITLE</span>
    </a> > 
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="1ST LEVEL URL" itemprop="url">
        <span itemprop="title">1ST LEVEL TITLE</span>
    </a> > 
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
    <a href="CURRENT LEVEL URL" itemprop="url">
        <span itemprop="title">CURRENT TITLE</span> …
Run Code Online (Sandbox Code Playgroud)

html seo breadcrumbs microdata google-rich-snippets

6
推荐指数
1
解决办法
3519
查看次数

标签 统计

breadcrumbs ×1

google-rich-snippets ×1

html ×1

microdata ×1

seo ×1