微数据:包括<span>作为<figure> </figure> </span>的孩子

时间:2012-02-29 13:56:47

标签: html5 microdata

我正在尝试使用schema.org找到一种丰富网页图像信息的方法。

但是,以下代码似乎没有通过审核:


<figure itemscope itemtype="http://schema.org/ImageObject" class="figure-container" style="width: 580px">
    <img itemprop="image" src="http://cdn.donaldjenkins.com/media/blog-posts/gtd-apps-1.jpg" alt="The Omnifocus Mac app" width="580" height="450" title="The Omnifocus Mac app">
    <figcaption itemprop="description"><span itemprop="name">The Omnifocus Mac app window</span>, showing the Perspectives settings panel. This is a powerful feature that allows you to conceal part of the app's inherent complexity when you want to. But Things allows you to do the same more easily with its 'Areas of responsibility' feature.</figcaption>
</figure>

包含<span>元素作为<figure>元素的子元素不会验证,但我还没有找到另一种方法将name属性附加到另一个标记,因为文本实际上不需要格式化。

欢迎任何有关如何实现这一目标的建议。我也不知道为什么<span>不能成为<figure>的孩子......

1 个答案:

答案 0 :(得分:2)

尝试http://validator.w3.org/nu/处的验证工具,我复制/粘贴您的片段,验证完好无损。