1

i am wondering what which way is better. I looked at the following answers HTML5 best practices; section/header/aside/article elements but can't find it. Someone a idea?

a)

<article>
  <h1>Title 1</h1>
  <section>
    <p>content</p>
  </section>

  <h2>Title 1.1</h2>
  <section>
     <p>content</p>
  </section>
 </article>

b)

<article>
  <h1>Title 1</h1>
  <section>
    <p>content</p>
    <h2>Title 1.1</h2>
    <section>
      <p>content</p>
    </section>
  </section>
</article>

Maybe there is even a better way?

Roy van Wensen
  • 580
  • 1
  • 5
  • 13
  • 2
    `section` is a semantic element. Its use case depends on your design patterns and preference. As long as your consistent and it works for you, it doesn't really matter – m_callens Jan 11 '18 at 15:16
  • Neither. A good rule of thumb is that each section and article should contain a `` element that introduces that section/article. So you should only have `

    Title 1

    content

    Title 1.1

    content

    `
    – Alohci Jan 11 '18 at 16:57

0 Answers0