HTML5 Tag/Attribute 从 <article> 中排除内容

HTML5 Tag/Attribute For Excluding Content From <article>

有什么方法可以让 webcrawlers/bots 清楚文章或章节中包含的内容与文章无关吗?

<article>
    <section>
        <div>
            <span>Amy Neville</span>
            <img src="http://www.example.com/amy.png">
            <span>Joined <time>5 Days</time> ago</span>
            <span>41525 Points</span>
        </div>
        <p>Mary, the only surviving legitimate child of King James V of Scotland, was six days old when her father died and she acceded to the throne. She spent most of her childhood in France while Scotland was ruled by regents, and in 1558, she married the Dauphin of France, Francis. He ascended the French throne as King Francis II in 1559, and Mary briefly became queen consort of France, until his death in December 1560.</p>
    </section>
</article>

在上面的示例中,我有一个论坛 post。旁边是 <div>,其中包含一些与 post 编辑者无关的信息。不相关,但可能与实际文章内容混淆。

是否有任何标签或属性可以明确这一点?

一般来说,如果一个分节元素包含 与该部分的内容完全不相关的信息,,您可以获得的最接近的信息是 <aside> 元素。


有关发布文章的人的信息与文章相关,因为它描述了该文章的作者。它不构成文章 内容 的一部分,但它仍然是相关的。

话虽如此,您可以使用 <header><footer> 在分节元素中标记作者信息。你甚至可以在一个部分的开头有一个 <footer>——这可能看起来很奇怪,但它完全没问题(参见 spec describing the <article> element)。

<article>
    <section>
        <footer>
            <span>Amy Neville</span>
            <img src="http://www.example.com/amy.png">
            <span>Joined <time>5 Days</time> ago</span>
            <span>41525 Points</span>
        </footer>
        <p>Mary, the only surviving legitimate child of King James V of Scotland, was six days old when her father died and she acceded to the throne. She spent most of her childhood in France while Scotland was ruled by regents, and in 1558, she married the Dauphin of France, Francis. He ascended the French throne as King Francis II in 1559, and Mary briefly became queen consort of France, until his death in December 1560.</p>
    </section>
</article>

<address> 元素外,没有用于标记作者信息的专用元素,但 <address> 用于联系信息。