您是否应该为面包屑标记主页和当前页面?我使用数据词汇表只是因为 schema.org 不允许标记标题或 url - 只有一行没有分隔符的文本,除非手动添加。
这是我现在拥有的一个例子。请注意,我标记了主页和当前页面 - 这是正确的还是应该标记一个或两个?
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a class="home" itemprop="url" href="/"><span itemprop="title"><img alt="Home" height="30" src="/images/trans.gif" width="16"></span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="/services/"><span itemprop="title">Services</a></span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="/service/widget/"><span itemprop="title">Widget</a></span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="/service/widget/features.htm"><span itemprop="title">Features</span></a></li>
最佳答案
我已经测试了以下似乎有效的方法,我认为您只有几个结尾 </span></a>
标记错误。
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a class="home" itemprop="url" href="/"><span itemprop="title"><img alt="Home" height="30" src="/images/trans.gif" width="16"></span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="/services/"><span itemprop="title">Services</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="/service/widget/"><span itemprop="title">Widget</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="/service/widget/features.htm"><span itemprop="title">Features</span></a></li>
您可能已经阅读过它,但您可以在此处阅读有关面包屑的更多信息:http://support.google.com/webmasters/bin/answer.py?hl=en&answer=185417 “微数据”链接就是一个很好的例子。
关于html - 面包屑标记 - 主页和当前页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15867675/