0

What is the up to date correct usage of the H tags?

I was originally told that it was only one H1 tag per page.

Now I am being told that you can use more than one h1 tag as long as it is only one per sectioning root or content section and that it is better than the former way.

What is the correct usage!

user3232801
  • 113
  • 3
  • 13

1 Answers1

0

According to mdn

In HTML5, use the <section> element to define the outline of a document. Headings provide titles for sections and subsections. You can also group a heading and its content using the <div> element.

So you can use multiple H1 as long as they are in different <section>

<section>
    <h1>Hi</h1>
    <p> ... </p>
</section>
<section>
    <h1>Hello</h1>
    <p> ... </p>
</section>
Maurizio Pozzobon
  • 3,044
  • 7
  • 34
  • 44