【问题标题】:h1 in article before section章节前的文章中的 h1
【发布时间】:2017-09-20 01:10:04
【问题描述】:

我不确定我的主要标题标签和其他语义元素是否正确。

在开始section之前,我可以在article中使用h1标签而不附加文本吗?

<main id="main" class="site-main">
 <article itemtype="http://schema.org/CreativeWork" itemscope="itemscope">
  <h1 itemprop="headline">Main Headline</h1>            
   <section itemprop="text">
     <h2>First Section Headline</h2>
     <p>Some text</p>
   </section>
   <section itemprop="text">
     <h2>Second Section Headline</h2>
     <p>Some text</p>
   </section>
   <section itemprop="text">
     <h2>Third Section Headline</h2>
     <p>Some text</p>
   </section>
</article>
</main>

【问题讨论】:

    标签: html semantic-markup html-heading


    【解决方案1】:

    &lt;article&gt; 是一个独立的单元,通常带有一个标题元素,因此没有什么可以阻止您在标题和nothing in the specification says otherwise 之后立即开始一个&lt;section&gt;。在这种情况下,标题元素只不过是文章的标题。

    【讨论】:

      猜你喜欢
      • 2010-09-21
      • 2014-11-17
      • 2021-03-12
      • 1970-01-01
      • 1970-01-01
      • 2013-01-21
      • 1970-01-01
      • 2019-10-23
      • 1970-01-01
      相关资源
      最近更新 更多