[英]can i use itemdata(microdata) in my web pages built with html 4
[英]I've added Microdata to web page HTML, but it shows up on publishing from CMS
如searchengineland.com中所述,我添加了以下导航标记,但它在发布网站时显示在标题上方。 我希望它能像附件中的图像一样显示在Google搜索结果中:
我正在使用Mac的Sandvox来发布站点。 我应该在哪里添加Microdata HTML?
我试图将其放在此代码内,并且仅打印在已发布的页面上:
<div itemscope itemtype="http://schema.org/LocalBusiness" id="sitemenu">
.....
<div itemscope itemtype="http://schema.org/SiteNavigationElement">
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement">
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/our- advantage">Our Advantage</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/our- travel-experts">Travel Experts</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/destinations">Destinations</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/cruises">Cruises</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/interests">Interests</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/explore-your-world/interests/hotels-and-resorts">Hotels</a></li>
<li itemprop="name"><a itemprop="url" href="http://www.travelstore.com/travel-guides">Travel Resources</a></li>
</ul>
</div>
您的Google搜索结果屏幕截图显示了两个功能:
您可以提供结构化数据标记来获取第一个功能( 站点 链接搜索框 ), 而不能提供结构化数据标记来获取第二个功能( 站点链接 )。
Google Search似乎没有使用Schema.org的SiteNavigationElement
类型的任何结果功能。 我建议完全不要使用SiteNavigationElement
。
如果仍然要使用SiteNavigationElement
,请注意您使用的方式不正确: 您只能标记整个导航 ,而不能标记单个导航链接。 因此, SiteNavigationElement
的url
和name
属性用于URL和导航本身的名称(并且导航通常不包含这些属性)。 因此它将是:
<ul itemscope itemtype="http://schema.org/SiteNavigationElement">
<li><a href="http://www.travelstore.com/our-advantage">Our Advantage</a></li>
<li><a href="http://www.travelstore.com/our-travel-experts">Travel Experts</a></li>
<li><a href="http://www.travelstore.com/destinations">Destinations</a></li>
</ul>
(请注意,Schema.org URI应该在没有www
子域的情况下指定。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.