我有一个博客页面,我不确定我是否正确理解了schema.org微数据。我有几个案例我不确定,我认为讨论它们会很好。我的代码:
<body lang="en" itemscope itemtype="http://schema.org/WebPage">
<section class="blog" itemscope itemtype="http://schema.org/Blog">
<article class="post" itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<header>
<time class="publish-date" datetime="2011-11-06T13:42:04+01:00" itemprop="datePublished">
November 2011
</time>
<h1 itemprop="name"><a href=blog/post-slug.html" itemprop="url">
My Title Here
</a></h1>
</header>
<section itemprop="description">
<p>The lead text here</p>
</section>
<section itemprop="articleBody">
<p>The other text here</p>
</section>
<footer>
This article is published by
<span itemprop="author">
John Doe
</span>
at
<time datetime="2012-10-01T15:33:04+02:00" itemprop="datePublished">
1 October 2012 on 15:33
</time>
and listed in the category
<a href=""><span itemprop="articleSection">
My Category
</span></a>.
The article is licensed under the <a href="http://creativecommons.org/licenses/by-sa/3.0/" target="_blank">Creative Commons Attribution-ShareAlike 3.0</a>.
</footer>
</article>
<h1>Comments</h1>
<ul class="comments" itemscope itemtype="http://schema.org/UserComments">
<li itemprop="comment">
<span itemprop="creator">Jane Doe</span>
<time itemprop="commentTime" datetime="2011-05-08T19:30">May 8, 7:30pm</time>
<article itemprop="commentText">
<p>A very good comment here</p>
</article>
</li>
</ul>
</section>
</body>
非常感谢建议和更正!
答案 0 :(得分:0)
即使是通用HTML语法也禁止在元素中使用相同的属性两次。但是,您可以嵌套元素并在嵌套元素中具有相同的属性。
验证程序http://validator.w3.org还会在代码中发现一些其他标记错误。
似乎没有任何证据表明schema.org标记被搜索引擎识别,除非在大型商业或社区网站上找到。