Use more than one h1?

5

If I've already used a h1 to set the logo / title of my Header, can I use any more h1 on the page? or just h2 ..? I can not remember where I read, but can I use h1 in each article or section?

<header>
   <h1>logo</h1>
</header>
<section>
   <article>
      <h2>titulo do post</h2>
      <p>descrição</p>
      content..
   </article>
</section>
    
asked by anonymous 11.07.2016 / 10:27

2 answers

3

You can use as many h1 , h2 and others as often as you like.

It takes into account that the semantic function is to emphasize the content of this piece / tag. Whether in terms of visual or SEO (Google indexing for example). So you must manage and use these tags with care, sense of organization. But you can use it as often as you like.

In the W3C specifications > you can see this example, with multiple h1 :

<body>
    <h1>Apples</h1>
    <p>Apples are fruit.</p>
    <section>
        <h1>Taste</h1>
        <p>They taste lovely.</p>
        <section>
            <h1>Sweet</h1>
            <p>Red apples are sweeter than green ones.</p>
        </section>
    </section>
    <section>
        <h1>Color</h1>
        <p>Apples come in various colors.</p>
    </section>
</body>

There are tags that can only be used once per page. Among these are html , head , base , title and body .

    
11.07.2016 / 10:35
2

In a very brief and objective way, yes, you can use more than once.

H1 only defines the importance level of the title.

If the page contains, for example, a call to 5 articles, each article usually has a title, then each call will have the title within an H1.

Example:

<header>
   <h1>logo</h1>
</header>
<section>
   <article>
      <h1>titulo do post 1</h1>
      <p>descrição</p>
      content..
   </article>
   <article>
      <h1>titulo do post 2</h1>
      <p>descrição</p>
      content..
   </article>
   <article>
      <h1>titulo do post 3</h1>
      <p>descrição</p>
      content..
   </article>
</section>
    
11.07.2016 / 10:35