W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] Footer inside header

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Wed, 2 May 2012 22:32:04 +0100
Message-ID: <CAEhSh3cZhA93v_xMQ5Os+euWPhRvfvx44SuW+-n7sY+B59eCtQ@mail.gmail.com>
On Fri, Apr 27, 2012 at 3:41 AM, Andr?s Sanhueza
<peroyomaslists at gmail.com> wrote:
> 2012/4/26 Benjamin Hawkes-Lewis <bhawkeslewis at googlemail.com>:
>>
>> On Apr 26, 2012 5:39 PM, "Tab Atkins Jr." <jackalmage at gmail.com> wrote:
>>>
>>> according to the definition of
>>> <footer>, it appears that authorship information is most appropriate
>>> to put there. ?But sometimes the byline is placed inside the "header"
>>> area, which is reasonably marked up with a <header>.
>>
>> Isn't that use case addressed by <address>?
>
> No. <address> is much narrower and indicated in the spec as such.
> Bylines can also contain the date or, in blog post, links to tags.

Good point.

Can you provide an example where you'd to put a <footer> *inside* a
<header> rather than after it like so:

 <article>
   <header>
     <hgroup>
       <h1>Headline</h1>
       <h2>Subhead</h2>
     </hgroup>
   </header>
   <footer>
     <p><time datetime="2012-04-30">30 April 2012</time></p>
     <p><address>John Doe</address></p>
     <p>Tags:</p>
     <ul>
       <li><a href="/tags/politics">politics</a>
       <li><a href="/tags/politics">environment</a>
     </ul>
   </footer>
   <p>Article body?</p>
 </article>

It's worth noting that the definition of <header> is broad enough to
allow byline, date, and tags ("group of introductory or navigational
aids"):

  http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-header-element

So you could also do:

 <article>
   <header>
     <hgroup>
       <h1>Headline</h1>
       <h2>Subhead</h2>
     </hgroup>
     <p><time datetime="2012-04-30">30 April 2012</time></p>
     <p><address>John Doe</address></p>
     <p>Tags:</p>
     <ul>
       <li><a href="/tags/politics">politics</a>
       <li><a href="/tags/politics">environment</a>
     </ul>
   </header>
   <p>Article body?</p>
 </article>

Personally, I think it might be easier to understand and provide user
agent behaviors if we to define header and footer as the header and
footer of sections, and then require:

   [start section]
   [zero or more aside elements]
   [zero or one header element]
   [other material]
   [zero or one footer element]
   [zero or more aside elements]
   [end section]

This way, if you hit a navigation key for footer you go to the end of
a section, like you'd expect.

Allowing <aside> before <header> or after <footer> is mostly a
concession to ad publishing.

In other words: define <header> and <footer> by their structural role
rather than their contents per se.

--
Benjamin Hawkes-Lewis
Received on Wednesday, 2 May 2012 14:32:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT