Re: Headers Are Confusing in HTML5

> That may be fine but brings me back to the point that we've got the
> header element for site-specific information now and the header element
> for section-specific information, but no header element for
> page-specific information. Whether this state is confusing may be open
> to debate, but the state itself is a fact, isn't it?

If the header of the body sectioning root is site-specific (which is 
typically the case), you should use a sectioning content element for the 
"page-specific" content on that page (i.e., the main content). That way, 
the header applies to this section instead of the document.

| <body>
|   <header> <!-- for the site --> </header>
|   <article>
|     <header> <!-- for this article -->  </header>
|     <section>
|       <header> <!-- for this section --> </header>
|     </section>
|   </article>
|   <footer> <!-- for the site --> </footer>
| </body>

So your examples could look like this:

| <body>
|   <header>
|     <h1>Are there elephants on the moon?</h1>
|     <p>You'll be amazed by what science has to say about this</p>
|   </header>
|   <section>
|     <header>
|       <h2>Introduction: A curious observation</h2>
|       <p>A drunk farmer looking into the dark set the ball rolling</p>
|     </header>
|     <p>When farmer Martin stumbled over a stick in front of the pub …
|   </section>


| <body>
|   <header>
|     <img src='fancy-news-website-logo.png' alt='The Village Times'>
|     <nav>
|       <ul>
|         <li><a href='/news/'>News</a></li>
|         <li><a href='/weather/'>Weather</a></li>
|         <li><a href='/horoscopes/'>Horoscopes</a></li>
|       </ul>
|     </nav>
|   </header>
|   <article>
|     <header>
|       <h1>Are there elephants on the moon?</h1>
|       <p>You'll be amazed by what science has to say about this</p>
|     </header>
|     <section>
|       <header>
|         <h2>Introduction: A curious observation</h2>
|         <p>A drunk farmer looking into …</p>
|       </header>
|       <p>When farmer Martin stumbled over …
|     </section>
|   </article>

Received on Tuesday, 1 December 2015 15:01:28 UTC