应当使用<article>或<section>来评论博客文章吗?

根据https://html.spec.whatwg.org/multipage/sections.html#the-article-element,用户在博客文章上发表的评论可能是<article>,但同一页面上则说明“部分构成其他内容的一部分。文章是其自身的东西。”

就我个人而言,我了解该块内的内容将是有意义的,而无需其他信息。但这不是本示例博客文章中的评论的全部内容,因为我需要文章的信息来了解用户正在谈论的网球比赛。

因此,我是否正确地说,<section>应该用<article>代替最后<section>的注释?

<article>
    <header>
        <h1>Roger Federer vs Novak Djokovic: Wimbledon 2019 Final</h1>
    </header>

    <section>
        <h3>First Set</h3>
    </section>

    <section>
        <h3>Second Set</h3>
    </section>

    <section>
        <article itemprop="comment" itemscope itemtype="http://schema.org/UserComments" id="c1">
            <p>Posted by: <span itemprop="creator" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">Jane Doe</span></span></p>

            <p>I cannot believe he missed those two match points!</p>
        </article>   

        <article itemprop="comment" itemscope itemtype="http://schema.org/UserComments" id="c2">
            <p>Posted by: <span itemprop="creator" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">John Doe</span></span></p>

            <p>The last point of the third game in set 1 was epic!</p>          
        </article>      
    </section>
</article>
pokkee 回答:应当使用<article>或<section>来评论博客文章吗?

您应该使用article标签,因为它可以让您在评论中使用H1标签(如果您不知道H1标签超过1个会伤害seo),并且W3Schools也建议您使用article标签有关更多信息,请检查此link

本文链接:https://www.f2er.com/2849139.html

大家都在问