将HTML5微数据放在预览块上是否很好? [英] Is it good to put HTML5 Microdata on preview blocks?

查看:137
本文介绍了将HTML5微数据放在预览块上是否很好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑这个例子:

<section id="news_block_left" class="block" itemscope="" itemtype="http://schema.org/ItemList">
    <a href="http://dev.com/index.php?controller=NewsList" title="News" itemprop="url">
        <h2 class="title_block" itemprop="name">News</h2>
    </a>
    <div class="block_content">
        <ul class="news-list">
            <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/NewsArticle">
                <a href="http://dev.com/index.php?id_news=7&controller=News" title="News Title1" itemprop="url">
                    <span><span itemprop="datePublished">2015-03-30</span> <em itemprop="headline">News Title1</em></span>
                </a>
            </li>
            <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/NewsArticle">
                <a href="http://dev.com/index.php?id_news=8&controller=News" title="T230 series (1999–2006)" itemprop="url">
                    <span><span itemprop="datePublished">2015-03-08</span> <em itemprop="headline">T230 series (1999–2006)</em></span>
                </a>
            </li>
        </ul>
        <meta itemprop="numberOfItems" content="2">
        <a class="more_news" href="http://dev.com/index.php?controller=NewsList" title="More news">
            <span>More news</span>
        </a>
    </div>
</section>

这个块存在于侧边栏中,它不包含完整的新闻元素数据,只有几个将它们链接起来。

This block exists in the sidebar, it doesn't contain full news element data, only a couple of link this them.

链接更多新闻会产生一个包含更多标记的更完整列表(但仍然只是一个包含实际文章链接的列表)。

The link "More news" leads to a more complete list with more markup (but still only a list with links to the actual articles).

将Microdata放在这样的预览列表上是否有好处?或者Microdata是否适用于完整页面(包含正文,产品页面等的完整新闻页面)?

Is there a benefit in putting Microdata on such preview lists? Or is Microdata intended for complete pages (complete news page with body, product page, etc.)?

P.S。不介意不友好的URL,它只是开发版。

P.S. Don't mind the unfriendly URLs, it's only dev version.

推荐答案

没关系。对于某些内容,绝不仅要求使用微数据。 Schema.org的词汇表也是如此。越多越好。

That’s fine. It’s in no way required to use Microdata only for certain content. The same goes for the vocabulary Schema.org. The more the merrier.

感谢您为每个 NewsArticle使用Schema.org的 url 属性项目,消费者有机会了解这些项目具有可能(但不一定)更相关的内容的单独网址。

Thanks to using Schema.org’s url property for each NewsArticle item, consumers have the chance to learn that these items have separate URLs with probably (but not necessarily) more relevant content.

在一边注意:您可能希望使用 name 而不是标题(或名称另外)。 name 属性,因为它可以在所有Schema.org类型上使用,可能比标题属性更多支持,只能在 CreativeWork 类型上使用。 (目前,它的'headline/alternativeHeadline域被讨论如果标题应标记为由 name 取代。)

On a side note: You might want to use name instead of headline (or name in addition). The name property, as it can be used on all Schema.org types, has probably more support than the headline property, which can only be used on CreativeWork types. (Currently it gets discussed if headline should be marked superseded by name.)

这篇关于将HTML5微数据放在预览块上是否很好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆