1

I have coded a HTML5 list of articles. I have been searching if this is the correct way to use the new HTML5 semantic tags, but I am still unsure. Is this markup correct in terms of using semantics?

<section>
   <article>
      <h2>Article</h2>
      <p>Description of article</p>
   </article>
   <article>
      <h2>Article</h2>
      <p>Description of article</p>
   </article>
   <article>
      <h2>Article</h2>
      <p>Description of article</p>
   </article>
</section>

1 Answers1

6

Yes that's fine, although it would be better if the <section> also had a heading, e.g.

<section>
   <h1>Article List</h1>
   <article>
      <h2>Article</h2>
      <p>Description of article</p>
   </article>
   ...
</section>
Ian Devlin
  • 18,534
  • 6
  • 55
  • 73