W3C home > Mailing lists > Public > public-html@w3.org > December 2015

Re: Headers Are Confusing in HTML5

From: Stefan Götz <res-html@untief.org>
Date: Tue, 01 Dec 2015 16:00:05 +0100
Message-ID: <565DB5F5.1010609@untief.org>
To: public-html@w3.org
> 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

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:17 UTC